diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-05-28 18:28:57 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-05-28 20:01:55 +0000 |
commit | c3c0dd00d8f2a0bbfb5961be048ccc66dc87b133 (patch) | |
tree | 08e7b2dd936a9829d9d53b0d13da4e30a40e0418 /nixos/tests | |
parent | 612defb824d5b695aa3f5a6944fad5f7ee9c320c (diff) |
treewide: fix loss of precision in NixOS systems
Prior to this patch: $ nix-instantiate --eval -E ' > with import ./. { > localSystem.config = "aarch64-unknown-linux-musl"; > }; > (nixos {}).config.nixpkgs.localSystem.config > ' "aarch64-unknown-linux-gnu" Because only the system triple was being passed through, the Musl part of the system specification was lost. This patch fixes various occurrences of NixOS evaluation when a Nixpkgs evaluation is already available, to pass through the full elaborated system attribute set, to avoid this loss of precision.
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/containers-imperative.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/tests/containers-imperative.nix b/nixos/tests/containers-imperative.nix index a21ce97a23b15..3007efaf88710 100644 --- a/nixos/tests/containers-imperative.nix +++ b/nixos/tests/containers-imperative.nix @@ -18,8 +18,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { # container available within the VM, because we don't have network access. virtualisation.additionalPaths = let emptyContainer = import ../lib/eval-config.nix { - inherit (config.nixpkgs.localSystem) system; modules = lib.singleton { + nixpkgs = { inherit (config.nixpkgs) localSystem; }; + containers.foo.config = { system.stateVersion = "18.03"; }; |