More renames

This commit is contained in:
Eelco Dolstra 2012-12-28 19:42:10 +01:00
parent dcdef5a0fe
commit e2d505b24e
4 changed files with 25 additions and 25 deletions

View File

@ -3,7 +3,7 @@
args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
, texinfo, glibcCross, hurdPartedCross, libuuid, samba_light
, gccCrossStageStatic, gccCrossStageFinal
, forceBuildDrv, forceSystem, newScope, platform, config, crossSystem
, forceNativeDrv, forceSystem, newScope, platform, config, crossSystem
, overrides ? {} }:
with args;
@ -12,7 +12,7 @@ let
callPackage = newScope gnu;
gnu = {
hurdCross = forceBuildDrv(callPackage ./hurd {
hurdCross = forceNativeDrv (callPackage ./hurd {
inherit fetchgit stdenv autoconf libtool texinfo
glibcCross hurdPartedCross;
inherit (gnu) machHeaders mig;
@ -23,7 +23,7 @@ let
gccCross = gccCrossStageFinal;
});
hurdCrossIntermediate = forceBuildDrv(callPackage ./hurd {
hurdCrossIntermediate = forceNativeDrv (callPackage ./hurd {
inherit fetchgit stdenv autoconf libtool texinfo glibcCross;
inherit (gnu) machHeaders mig;
hurdPartedCross = null;
@ -58,7 +58,7 @@ let
hurd = null;
};
libpthreadCross = forceBuildDrv(callPackage ./libpthread {
libpthreadCross = forceNativeDrv (callPackage ./libpthread {
inherit fetchgit stdenv autoconf automake libtool glibcCross;
inherit (gnu) machHeaders hurdHeaders;
hurd = gnu.hurdCrossIntermediate;

View File

@ -130,13 +130,13 @@ rec {
# In nixpkgs, sometimes 'null' gets in as a buildInputs element,
# 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;
getNativeDrv = drv: drv.nativeDrv or drv;
getCrossDrv = drv: drv.crossDrv or drv;
nativeBuildInputsDrvs = map getNativeDrv nativeBuildInputs;
buildInputsDrvs = map getCrossDrv buildInputs;
buildInputsDrvsAsBuildInputs = map getNativeDrv buildInputs;
propagatedBuildInputsDrvs = map getCrossDrv propagatedBuildInputs;
propagatedNativeBuildInputsDrvs = map getNativeDrv propagatedNativeBuildInputs;
# The base stdenv already knows that nativeBuildInputs and
# buildInputs should be built with the usual gcc-wrapper
@ -146,12 +146,12 @@ rec {
# Temporary expression until the cross_renaming, to handle the
# case of pkgconfig given as buildInput, but to be used as
# nativeBuildInput.
hostAsBuildDrv = drv:
hostAsNativeDrv = 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 hostAsNativeDrv buildInputsNotNull;
# We should overwrite the input attributes in crossDrv, to overwrite
# the defaults for only-native builds in the base stdenv

View File

@ -222,7 +222,7 @@ let
else
defaultStdenv;
forceBuildDrv = drv : if (crossSystem == null) then drv else
forceNativeDrv = drv : if (crossSystem == null) then drv else
(drv // { crossDrv = drv.nativeDrv; });
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
@ -1992,7 +1992,7 @@ let
if isMingw then windows.mingw_headers1 else null;
in
wrapGCCCross {
gcc = forceBuildDrv (lib.addMetaAttrs { platforms = []; } (
gcc = forceNativeDrv (lib.addMetaAttrs { platforms = []; } (
gcc_realCross.override {
crossStageStatic = true;
langCC = false;
@ -2013,7 +2013,7 @@ let
};
gccCrossStageFinal = wrapGCCCross {
gcc = forceBuildDrv (gcc_realCross.override {
gcc = forceNativeDrv (gcc_realCross.override {
libpthreadCross =
# FIXME: Don't explicitly refer to `i586-pc-gnu'.
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
@ -2683,7 +2683,7 @@ let
wrapGCCCross =
{gcc, libc, binutils, cross, shell ? "", name ? "gcc-cross-wrapper"}:
forceBuildDrv (import ../build-support/gcc-cross-wrapper {
forceNativeDrv (import ../build-support/gcc-cross-wrapper {
nativeTools = false;
nativeLibc = false;
noLibc = (libc == null);
@ -2967,7 +2967,7 @@ let
gold = true;
});
binutilsCross = lowPrio (forceBuildDrv (import ../development/tools/misc/binutils {
binutilsCross = lowPrio (forceNativeDrv (import ../development/tools/misc/binutils {
inherit stdenv fetchurl zlib;
noSysDirs = true;
cross = assert crossSystem != null; crossSystem;
@ -3182,7 +3182,7 @@ let
cross_renaming: we should make all programs use pkgconfig as
nativeBuildInput after the renaming.
*/
pkgconfig = forceBuildDrv (callPackage ../development/tools/misc/pkgconfig { });
pkgconfig = forceNativeDrv (callPackage ../development/tools/misc/pkgconfig { });
pkgconfigUpstream = lowPrio (pkgconfig.override { vanilla = true; });
premake = callPackage ../development/tools/misc/premake { };
@ -3636,7 +3636,7 @@ let
gccCross = null;
}) // (if crossSystem != null then { crossDrv = glibc213Cross; } else {});
glibc213Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc/2.13)
glibc213Cross = forceNativeDrv (makeOverridable (import ../development/libraries/glibc/2.13)
(let crossGNU = crossSystem != null && crossSystem.config == "i586-pc-gnu";
in {
inherit stdenv fetchurl;
@ -5688,12 +5688,12 @@ let
linuxHeaders35 = callPackage ../os-specific/linux/kernel-headers/3.5.nix { };
linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix {
linuxHeaders26Cross = forceNativeDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix {
inherit stdenv fetchurl perl;
cross = assert crossSystem != null; crossSystem;
});
linuxHeaders24Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.4.nix {
linuxHeaders24Cross = forceNativeDrv (import ../os-specific/linux/kernel-headers/2.4.nix {
inherit stdenv fetchurl perl;
cross = assert crossSystem != null; crossSystem;
});

View File

@ -3,7 +3,7 @@ let
nativePlatforms = linux;
/* Basic list of packages to cross-build */
basicHostDrv = {
basicCrossDrv = {
gccCrossStageFinal = nativePlatforms;
bison.crossDrv = nativePlatforms;
busybox.crossDrv = nativePlatforms;
@ -24,11 +24,11 @@ let
/* Basic list of packages to be natively built,
but need a crossSystem defined to get meaning */
basicBuildDrv = {
basicNativeDrv = {
gdbCross = nativePlatforms;
};
basic = basicHostDrv // basicBuildDrv;
basic = basicCrossDrv // basicNativeDrv;
in
(