diff options
author | Arthur Gautier <arthur.gautier@arista.com> | 2023-06-03 19:43:20 -0700 |
---|---|---|
committer | Arthur Gautier <arthur.gautier@arista.com> | 2023-06-29 09:13:44 -0700 |
commit | 18c734d7f2ca4e86730808b8b4900363cb705ed3 (patch) | |
tree | e6bfb36e44c95359b970bfb5bf89a831b62ad295 /nixos | |
parent | 768105512409ad0e955de2496cbf41a5f11a3871 (diff) |
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') ''; } ```
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/lib/testing/nodes.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index 6e439fd814db7..f58759b4cdba0 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -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 ]; |