diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-07-11 16:06:08 -0400 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-07-11 16:06:08 -0400 |
commit | 18c8866f7740c717b66558649a44c9e40816c38a (patch) | |
tree | c492e40d9038e1c6d35986e8fcda632cddd794ce /pkgs/stdenv | |
parent | 8d05772134f17180fb2711d0660702dae2a67313 (diff) |
stdenv: correctly make `stdenv.system` refer to the host platform
This was supposed to be done in 773233ca771a, but was not due to a small mistake.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index e17b41eab3204..b579897869046 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; |