true doesn't work in chroots yet.
Minimal test case illustrating the issue:
# nix-env test.nix - the echoed lines should be store path.
# only config1 is one. This is too hacky. We should fix Nix.
let pkgs = import /etc/nixos/nixpkgs {};
in
pkgs.stdenv.mkDerivation {
name = "test";
unpackPhase = ''for x in config{1,2,3}; do echo $x ''${!x}; done; exit 1'';
config1 = /etc/.. + (builtins.substring 1 9999 (pkgs.lib.maybeEnv
"NIXOS_CONFIG" "/etc/nixos/configuration.nix"));
config2 = pkgs.lib.maybeEnv "NIXOS_CONFIG" "/etc/nixos/configuration.nix";
config3 = builtins.toPath (pkgs.lib.maybeEnv "NIXOS_CONFIG"
"/etc/nixos/configuration.nix");
}
Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev