diff options
author | volth <volth@webmaster.ms> | 2018-11-10 01:18:06 +0000 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-09 19:18:06 -0600 |
commit | 5ea22a5b00583843b3dbf3b1cc0c7a645578e376 (patch) | |
tree | bdd2382f2bf3e9cf192f5b63561a9211bf8431ff /nixos/modules/services/misc/nix-daemon.nix | |
parent | 3f76d762267c9e1fd9f2cc8c027b85f7e2d5fd97 (diff) | |
download | nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.tar nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.tar.gz nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.tar.bz2 nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.tar.lz nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.tar.xz nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.tar.zst nixpkgs-5ea22a5b00583843b3dbf3b1cc0c7a645578e376.zip |
nixos/nix: ignore nix.checkConfig when cross-compiling (#48225)
* nixos/nix: ignore nix.checkConfig when cross-compiling the check always fails because of architecture mismatch * typos
Diffstat (limited to 'nixos/modules/services/misc/nix-daemon.nix')
-rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 5e171c08d89..97357557061 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -62,11 +62,15 @@ let ''} $extraOptions END - '' + optionalString cfg.checkConfig '' - echo "Checking that Nix can read nix.conf..." - ln -s $out ./nix.conf - NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null - ''); + '' + optionalString cfg.checkConfig ( + if pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform then '' + echo "Ignore nix.checkConfig when cross-compiling" + '' else '' + echo "Checking that Nix can read nix.conf..." + ln -s $out ./nix.conf + NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null + '') + ); in |