Merge pull request #46517 from srhb/revert-build-host-target-platform-deprecation-master
Revert build host target platform deprecation on master
This commit is contained in:
commit
34e3502297
@ -47,9 +47,13 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
In Nixpkgs, these three platforms are defined as attribute sets under the
|
In Nixpkgs, these three platforms are defined as attribute sets under the
|
||||||
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and
|
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>,
|
||||||
<literal>targetPlatform</literal>. They are always defined as attributes in
|
and <literal>targetPlatform</literal>. All three are always defined as
|
||||||
the standard environment. That means one can access them like:
|
attributes in the standard environment, and at the top level. That means
|
||||||
|
one can get at them just like a dependency in a function that is imported
|
||||||
|
with <literal>callPackage</literal>:
|
||||||
|
<programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...buildPlatform...</programlisting>
|
||||||
|
, or just off <varname>stdenv</varname>:
|
||||||
<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
|
<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
|
||||||
.
|
.
|
||||||
</para>
|
</para>
|
||||||
|
@ -79,17 +79,11 @@ let
|
|||||||
|
|
||||||
# The old identifiers for cross-compiling. These should eventually be removed,
|
# The old identifiers for cross-compiling. These should eventually be removed,
|
||||||
# and the packages that rely on them refactored accordingly.
|
# and the packages that rely on them refactored accordingly.
|
||||||
platformCompat = self: super: {
|
platformCompat = self: super: let
|
||||||
buildPlatform = lib.warn
|
inherit (super.stdenv) buildPlatform hostPlatform targetPlatform;
|
||||||
"top-level `buildPlatform` is deprecated since 18.09. Please use `stdenv.buildPlatform`."
|
in {
|
||||||
super.stdenv.buildPlatform;
|
inherit buildPlatform hostPlatform targetPlatform;
|
||||||
hostPlatform = lib.warn
|
inherit (buildPlatform) system;
|
||||||
"top-level `hostPlatform` is deprecated since 18.09. Please use `stdenv.hostPlatform`."
|
|
||||||
super.stdenv.hostPlatform;
|
|
||||||
targetPlatform = lib.warn
|
|
||||||
"top-level `targetPlatform` is deprecated since 18.09. Please use `stdenv.targetPlatform`."
|
|
||||||
super.stdenv.targetPlatform;
|
|
||||||
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…
Reference in New Issue
Block a user