git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #46148 from obsidiansystems/plain-system-host

top-level, stdenv: Make `system` and `stdenv.system` describe the hostPlatform

commit24209d29f08c9f0dfeffffd2b30d0aebd536341e authorJohn Ericson <mail@JohnEricson.me> dateThu 6 Sep 2018, 09:37 (8 years ago) parenta2784148ae2703
3 files changed+12−1
nixos/doc/manual/release-notes/rl-1809.xml+8 pkgs/stdenv/generic/default.nix+3 pkgs/top-level/stage.nix+1−1
nixos/doc/manual/release-notes/rl-1809.xml+8
@@ -283,6 +283,14 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
283283 from your config without any issues.
284284 </para>
285285 </listitem>
286+ <listitem>
287+ <para>
288+ <literal>stdenv.system</literal> and <literal>system</literal> in nixpkgs now refer to the host platform instead of the build platform.
289+ For native builds this is not change, let alone a breaking one.
290+ For cross builds, it is a breaking change, and <literal>stdenv.buildPlatform.system</literal> can be used instead for the old behavior.
291+ They should be using that anyways for clarity.
292+ </para>
293+ </listitem>
286294 </itemizedlist>
287295 </section>
288296
pkgs/stdenv/generic/default.nix+3
@@ -127,6 +127,9 @@ let
127127 "`stdenv.isArm` is deprecated after 18.03. Please use `stdenv.isAarch32` instead"
128128 hostPlatform.isAarch32;
129129
130+ # The derivation's `system` is `buildPlatform.system`.
131+ inherit (buildPlatform) system;
132+
130133 # Whether we should run paxctl to pax-mark binaries.
131134 needsPax = isLinux;
132135
pkgs/top-level/stage.nix+1−1
@@ -89,7 +89,7 @@ let
8989 targetPlatform = lib.warn
9090 "top-level `targetPlatform` is deprecated since 18.09. Please use `stdenv.targetPlatform`."
9191 super.stdenv.targetPlatform;
92− inherit (super.stdenv.buildPlatform) system;
92+ inherit (super.stdenv.hostPlatform) system;
9393 };
9494
9595 splice = self: super: import ./splice.nix lib self (buildPackages != null);