summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-07 13:24:33 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-07 13:24:33 -0400
commit9dc2a3aeba864f0fd989e50344500a94df0efc1f (patch)
treebe6fe1adeba83fd875b1d3f4447cefa51c0039c1 /doc
parenta302d7360f201cc4fcfb4a43a432b31536795507 (diff)
downloadnixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.tar
nixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.tar.gz
nixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.tar.bz2
nixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.tar.lz
nixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.tar.xz
nixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.tar.zst
nixpkgs-9dc2a3aeba864f0fd989e50344500a94df0efc1f.zip
doc: Update cross compilation chapter for stdenv.{build,host,target}Platform
Diffstat (limited to 'doc')
-rw-r--r--doc/cross-compilation.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/cross-compilation.xml b/doc/cross-compilation.xml
index 650db718665..77d020afa2d 100644
--- a/doc/cross-compilation.xml
+++ b/doc/cross-compilation.xml
@@ -37,8 +37,9 @@
     </para>
     <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 at the top level, so 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, .. }: ...</programlisting>
+      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>
     <variablelist>
       <varlistentry>