summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-28 19:08:19 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-28 19:08:19 +0100
commit5be0a9acd7b9abe4bff3202a7ac7defc17a37877 (patch)
tree25491a83f604f1ace6a1170505955df5817495c2 /pkgs/stdenv
parentf4ed8a3b911628335a53b3b5ddb48e9ec8d8bdcf (diff)
downloadnixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.tar
nixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.tar.gz
nixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.tar.bz2
nixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.tar.lz
nixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.tar.xz
nixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.tar.zst
nixlib-5be0a9acd7b9abe4bff3202a7ac7defc17a37877.zip
Rename hostDrv -> crossDrv, buildDrv -> nativeDrv
This is for consistency with terminology in stdenv (and the terms
"hostDrv" and "buildDrv" are not very intuitive, even if they're
consistent with GNU terminology).
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/adapters.nix22
-rw-r--r--pkgs/stdenv/generic/setup.sh2
2 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index fb0eed51d56d..1ee88a821166 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -133,8 +133,8 @@ rec {
 
             # In nixpkgs, sometimes 'null' gets in as a buildInputs element,
             # and we handle that through isAttrs.
-            getBuildDrv = drv : if (builtins.isAttrs drv && drv ? buildDrv) then drv.buildDrv else drv;
-            getHostDrv = drv : if (builtins.isAttrs drv && drv ? hostDrv) then drv.hostDrv else drv;
+            getBuildDrv = drv : if (builtins.isAttrs drv && drv ? nativeDrv) then drv.nativeDrv else drv;
+            getHostDrv = drv : if (builtins.isAttrs drv && drv ? crossDrv) then drv.crossDrv else drv;
             buildNativeInputsDrvs = map (getBuildDrv) buildNativeInputs;
             buildInputsDrvs = map (getHostDrv) buildInputs;
             buildInputsDrvsAsBuildInputs = map (getBuildDrv) buildInputs;
@@ -145,27 +145,27 @@ rec {
             # The base stdenv already knows that buildNativeInputs and
             # buildInputs should be built with the usual gcc-wrapper
             # And the same for propagatedBuildInputs.
-            buildDrv = stdenv.mkDerivation args;
+            nativeDrv = stdenv.mkDerivation args;
 
             # Temporary expression until the cross_renaming, to handle the
             # case of pkgconfig given as buildInput, but to be used as
             # buildNativeInput.
             hostAsBuildDrv = drv: builtins.unsafeDiscardStringContext
-                drv.buildDrv.drvPath == builtins.unsafeDiscardStringContext
-                drv.hostDrv.drvPath;
+                drv.nativeDrv.drvPath == builtins.unsafeDiscardStringContext
+                drv.crossDrv.drvPath;
             buildInputsNotNull = stdenv.lib.filter
-                (drv: builtins.isAttrs drv && drv ? buildDrv) buildInputs;
+                (drv: builtins.isAttrs drv && drv ? nativeDrv) buildInputs;
             nativeInputsFromBuildInputs = stdenv.lib.filter (hostAsBuildDrv) buildInputsNotNull;
 
-            # We should overwrite the input attributes in hostDrv, to overwrite
+            # We should overwrite the input attributes in crossDrv, to overwrite
             # the defaults for only-native builds in the base stdenv
-            hostDrv = if (cross == null) then buildDrv else
+            crossDrv = if (cross == null) then nativeDrv else
                 stdenv.mkDerivation (args // {
                     name = name + "-" + cross.config;
                     buildNativeInputs = buildNativeInputsDrvs
                       ++ nativeInputsFromBuildInputs
                       ++ [ gccCross binutilsCross ] ++
-                      stdenv.lib.optional selfBuildNativeInput buildDrv;
+                      stdenv.lib.optional selfBuildNativeInput nativeDrv;
 
                     # Cross-linking dynamic libraries, every buildInput should
                     # be propagated because ld needs the -rpath-link to find
@@ -178,8 +178,8 @@ rec {
 
                     crossConfig = cross.config;
                 } // (if args ? crossAttrs then args.crossAttrs else {}));
-        in buildDrv // {
-            inherit hostDrv buildDrv;
+        in nativeDrv // {
+            inherit crossDrv nativeDrv;
         };
     } // {
       inherit cross gccCross binutilsCross;
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 16b05fc0b294..221254a36ed3 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -197,7 +197,7 @@ addToCrossEnv() {
     local pkg=$1
 
     # Some programs put important build scripts (freetype-config and similar)
-    # into their hostDrv bin path. Intentionally these should go after
+    # into their crossDrv bin path. Intentionally these should go after
     # the nativePkgs in PATH.
     if [ -d $1/bin ]; then
         addToSearchPath _PATH $1/bin