diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-28 19:37:42 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-28 19:37:42 +0100 |
commit | dcdef5a0fed73eb0d39db43c462956db85c00bec (patch) | |
tree | 5c67baf98bfc6f062491b0663c0aa00ed95e4aa9 | |
parent | 22ba03c1234d3f49b4e97d1398b1826c3cec49ec (diff) |
More random cleanup
-rw-r--r-- | pkgs/stdenv/adapters.nix | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index 211a9d8f05567..65b94fbe91d2f 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -132,12 +132,11 @@ rec { # and we handle that through isAttrs. getBuildDrv = drv: drv.nativeDrv or drv; getHostDrv = drv: drv.crossDrv or drv; - nativeBuildInputsDrvs = map (getBuildDrv) nativeBuildInputs; - buildInputsDrvs = map (getHostDrv) buildInputs; - buildInputsDrvsAsBuildInputs = map (getBuildDrv) buildInputs; - propagatedBuildInputsDrvs = map (getHostDrv) (propagatedBuildInputs); - propagatedNativeBuildInputsDrvs = map (getBuildDrv) - (propagatedNativeBuildInputs); + nativeBuildInputsDrvs = map getBuildDrv nativeBuildInputs; + buildInputsDrvs = map getHostDrv buildInputs; + buildInputsDrvsAsBuildInputs = map getBuildDrv buildInputs; + propagatedBuildInputsDrvs = map getHostDrv propagatedBuildInputs; + propagatedNativeBuildInputsDrvs = map getBuildDrv propagatedNativeBuildInputs; # The base stdenv already knows that nativeBuildInputs and # buildInputs should be built with the usual gcc-wrapper @@ -147,16 +146,16 @@ rec { # Temporary expression until the cross_renaming, to handle the # case of pkgconfig given as buildInput, but to be used as # nativeBuildInput. - hostAsBuildDrv = drv: builtins.unsafeDiscardStringContext - drv.nativeDrv.drvPath == builtins.unsafeDiscardStringContext - drv.crossDrv.drvPath; + hostAsBuildDrv = drv: + builtins.unsafeDiscardStringContext drv.nativeDrv.drvPath + == builtins.unsafeDiscardStringContext drv.crossDrv.drvPath; buildInputsNotNull = stdenv.lib.filter (drv: builtins.isAttrs drv && drv ? nativeDrv) buildInputs; - nativeInputsFromBuildInputs = stdenv.lib.filter (hostAsBuildDrv) buildInputsNotNull; + nativeInputsFromBuildInputs = stdenv.lib.filter hostAsBuildDrv buildInputsNotNull; # We should overwrite the input attributes in crossDrv, to overwrite # the defaults for only-native builds in the base stdenv - crossDrv = if (cross == null) then nativeDrv else + crossDrv = if cross == null then nativeDrv else stdenv.mkDerivation (args // { name = name + "-" + cross.config; nativeBuildInputs = nativeBuildInputsDrvs @@ -169,14 +168,13 @@ rec { # any library needed to link the program dynamically at # loader time. ld(1) explains it. buildInputs = []; - propagatedBuildInputs = propagatedBuildInputsDrvs ++ - buildInputsDrvs; + propagatedBuildInputs = propagatedBuildInputsDrvs ++ buildInputsDrvs; propagatedNativeBuildInputs = propagatedNativeBuildInputsDrvs; crossConfig = cross.config; } // args.crossAttrs or {}); in nativeDrv // { - inherit crossDrv nativeDrv; + inherit crossDrv nativeDrv; }; } // { inherit cross gccCross binutilsCross; |