forked from mirrors/nixpkgs
doc: Don't mention top-level {build, host, target}Platform
For technical reasons, we cannot easily add a warning to top-level definitions, so2a6e4ae49a
ande51f736076
reverted the deprecation. But we can still remove mention of the would-be deprecated definitions to steer people towards using the preferred alternatives.
This commit is contained in:
parent
359d00f8b0
commit
e39a73cc55
|
@ -47,13 +47,9 @@
|
|||
|
||||
<para>
|
||||
In Nixpkgs, these three platforms are defined as attribute sets under the
|
||||
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>,
|
||||
and <literal>targetPlatform</literal>. All three are always defined as
|
||||
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>:
|
||||
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and
|
||||
<literal>targetPlatform</literal>. They are always defined as attributes in
|
||||
the standard environment. That means one can access them like:
|
||||
<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
|
||||
.
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue