mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixosTest: adds support for lib.extend
When lib overrides were used, before this commit, they would not be made available in the configuration evaluation of nixosTest's nodes. Sample code: ``` nix let pkgs = import ./. { overlays = [ (new: old: { lib = old.lib.extend (self: super: { sorry_dave = builtins.trace "There are no pod bay doors" "sorry dave"; }); }) ]; }; in pkgs.testers.nixosTest { name = "demo lib overlay"; nodes = { machine = { lib, ... }: { environment.etc."got-lib-overlay".text = lib.sorry_dave; }; }; testScript = { nodes }: '' start_all() machine.succeed('grep dave /etc/got-lib-overlay') ''; } ```
This commit is contained in:
parent
7681055124
commit
18c734d7f2
@ -16,6 +16,7 @@ let
|
||||
|
||||
baseOS =
|
||||
import ../eval-config.nix {
|
||||
inherit lib;
|
||||
system = null; # use modularly defined system
|
||||
inherit (config.node) specialArgs;
|
||||
modules = [ config.defaults ];
|
||||
|
Loading…
Reference in New Issue
Block a user