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
This commit is contained in:
volth 2018-11-10 01:18:06 +00:00 committed by Matthew Bauer
parent 3f76d76226
commit 5ea22a5b00

View File

@ -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