summary refs log tree commit diff
path: root/doc/cross-compilation.xml
diff options
context:
space:
mode:
authorSarah Brofeldt <sbrofeldt@gmail.com>2018-09-11 12:04:00 +0200
committerSarah Brofeldt <sbrofeldt@gmail.com>2018-09-11 13:25:50 +0200
commit2a6e4ae49a891adc7c0562fda08b17d60beb1b4f (patch)
tree5e8e60a510d189a66ca1242d353f6fcb19ed8203 /doc/cross-compilation.xml
parente02575b906b3a45f2c60018442d4082976dfd8da (diff)
downloadnixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.tar
nixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.tar.gz
nixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.tar.bz2
nixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.tar.lz
nixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.tar.xz
nixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.tar.zst
nixpkgs-2a6e4ae49a891adc7c0562fda08b17d60beb1b4f.zip
Revert "top-level: Deprecate top-level `{build,host,target}Platform`"
This reverts commit e51f736076548459f36a1250de4bf6867f880b66.
Diffstat (limited to 'doc/cross-compilation.xml')
-rw-r--r--doc/cross-compilation.xml10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/cross-compilation.xml b/doc/cross-compilation.xml
index c7187d86d1b..3b90596bcc2 100644
--- a/doc/cross-compilation.xml
+++ b/doc/cross-compilation.xml
@@ -47,9 +47,13 @@
 
    <para>
     In Nixpkgs, these three platforms are defined as attribute sets under the
-    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:
+    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>:
 <programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
     .
    </para>