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:
commit
24209d29f0
@ -283,6 +283,14 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
|
|||||||
from your config without any issues.
|
from your config without any issues.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</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>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -127,6 +127,9 @@ let
|
|||||||
"`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
|
"`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
|
||||||
hostPlatform.isAarch32;
|
hostPlatform.isAarch32;
|
||||||
|
|
||||||
|
# The derivation's `system` is `buildPlatform.system`.
|
||||||
|
inherit (buildPlatform) system;
|
||||||
|
|
||||||
# Whether we should run paxctl to pax-mark binaries.
|
# Whether we should run paxctl to pax-mark binaries.
|
||||||
needsPax = isLinux;
|
needsPax = isLinux;
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ let
|
|||||||
targetPlatform = lib.warn
|
targetPlatform = lib.warn
|
||||||
"top-level `targetPlatform` is deprecated since 18.09. Please use `stdenv.targetPlatform`."
|
"top-level `targetPlatform` is deprecated since 18.09. Please use `stdenv.targetPlatform`."
|
||||||
super.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);
|
splice = self: super: import ./splice.nix lib self (buildPackages != null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user