at master 961 B view raw
1{ pkgs, ... }: 2 3let 4 patchedPkgs = pkgs.extend ( 5 new: old: { 6 lib = old.lib.extend ( 7 self: super: { 8 sorry_dave = "sorry dave"; 9 } 10 ); 11 } 12 ); 13 14 testBody = { 15 name = "demo lib overlay"; 16 17 nodes = { 18 machine = 19 { lib, ... }: 20 { 21 environment.etc."got-lib-overlay".text = lib.sorry_dave; 22 }; 23 }; 24 25 # We don't need to run an actual test. Instead we build the `machine` configuration 26 # and call it a day, because that already proves that `lib` is wired up correctly. 27 # See the attrset returned at the bottom of this file. 28 testScript = ""; 29 }; 30 31 inherit (patchedPkgs.testers) nixosTest runNixOSTest; 32 evaluationNixosTest = nixosTest testBody; 33 evaluationRunNixOSTest = runNixOSTest testBody; 34in 35{ 36 nixosTest = evaluationNixosTest.driver.nodes.machine.system.build.toplevel; 37 runNixOSTest = evaluationRunNixOSTest.driver.nodes.machine.system.build.toplevel; 38}