Merge pull request #46148 from obsidiansystems/plain-system-host

top-level, stdenv: Make `system` and `stdenv.system` describe the hostPlatform
This commit is contained in:
John Ericson 2018-09-06 09:37:20 -04:00 committed by GitHub
commit 24209d29f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -283,6 +283,14 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
from your config without any issues.
</para>
</listitem>
<listitem>
<para>
<literal>stdenv.system</literal> and <literal>system</literal> in nixpkgs now refer to the host platform instead of the build platform.
For native builds this is not change, let alone a breaking one.
For cross builds, it is a breaking change, and <literal>stdenv.buildPlatform.system</literal> can be used instead for the old behavior.
They should be using that anyways for clarity.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -127,6 +127,9 @@ let
"`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
hostPlatform.isAarch32;
# The derivation's `system` is `buildPlatform.system`.
inherit (buildPlatform) system;
# Whether we should run paxctl to pax-mark binaries.
needsPax = isLinux;

View file

@ -89,7 +89,7 @@ let
targetPlatform = lib.warn
"top-level `targetPlatform` is deprecated since 18.09. Please use `stdenv.targetPlatform`."
super.stdenv.targetPlatform;
inherit (super.stdenv.buildPlatform) system;
inherit (super.stdenv.hostPlatform) system;
};
splice = self: super: import ./splice.nix lib self (buildPackages != null);