diff options
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/check-meta.nix | 13 | ||||
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 7 |
2 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 21ae809a2225..c06f17b6fc19 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -108,7 +108,12 @@ let You can install it anyway by whitelisting this package, using the following methods: - a) for `nixos-rebuild` you can add ‘${getName attrs}’ to + a) To temporarily allow all insecure packages, you can use an environment + variable for a single invocation of the nix tools: + + $ export NIXPKGS_ALLOW_INSECURE=1 + + b) for `nixos-rebuild` you can add ‘${getName attrs}’ to `nixpkgs.config.permittedInsecurePackages` in the configuration.nix, like so: @@ -118,9 +123,9 @@ let ]; } - b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add - ‘${getName attrs}’ to `permittedInsecurePackages` in - ~/.config/nixpkgs/config.nix, like so: + c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add + ‘${getName attrs}’ to `permittedInsecurePackages` in + ~/.config/nixpkgs/config.nix, like so: { permittedInsecurePackages = [ diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index e17b41eab320..b57989786904 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -138,8 +138,11 @@ let is32bit is64bit isAarch32 isAarch64 isMips isBigEndian; - # The derivation's `system` is `buildPlatform.system`. - inherit (buildPlatform) system; + # Override `system` so that packages can get the system of the host + # platform through `stdenv.system`. `system` is originally set to the + # build platform within the derivation above so that Nix directs the build + # to correct type of machine. + inherit (hostPlatform) system; inherit (import ./make-derivation.nix { inherit lib config stdenv; |