Updating from trunk (to get uclibc changes...)

I want to cross-build utillinux and coreutils, and that play will have to go in stdenv-updates I think.


svn path=/nixpkgs/branches/stdenv-updates/; revision=20506
This commit is contained in:
Lluís Batlle i Rossell 2010-03-09 16:31:36 +00:00
commit 70b2dd393c
8 changed files with 123 additions and 112 deletions

View File

@ -60,11 +60,9 @@ rec {
HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees
# Prebuild the format files, as it used to be done with TeXLive 2007. # Prebuild the format files, as it used to be done with TeXLive 2007.
# Note the funny argument parser of `mktexfmt', which wants something echo "building format files..."
# ending in `.fmt' as its first argument.
ensureDir "$out/texmf-var/web2c" ensureDir "$out/texmf-var/web2c"
PATH="$PATH:$out/bin" mktexfmt does-not-matter.fmt \ PATH="$PATH:$out/bin" fmtutil-sys --all
--fmtdir="$out/texmf-var/web2c" --all
PATH=$PATH:$out/bin mktexlsr $out/texmf* PATH=$PATH:$out/bin mktexlsr $out/texmf*
'') ["minInit" "defEnsureDir" "doUnpack" "doMakeInstall"]; '') ["minInit" "defEnsureDir" "doUnpack" "doMakeInstall"];

View File

@ -1,17 +1,17 @@
{stdenv, fetchurl, linuxHeaders, gccCross ? null}: {stdenv, fetchurl, linuxHeaders, cross ? null, gccCross ? null}:
assert stdenv.isLinux; assert stdenv.isLinux;
assert cross != null -> gccCross != null;
let let
target = if (gccCross != null) then gccCross.target else null; enableArmEABI = (cross == null && stdenv.platform.kernelArch == "arm")
enableArmEABI = (target == null && stdenv.system "armv5tel-linux") || (cross != null && cross.arch == "arm");
|| (target != null && target.arch == "arm");
configArmEABI = if enableArmEABI then configArmEABI = if enableArmEABI then
''-e 's/.*CONFIG_ARM_OABI.*//' \ ''-e 's/.*CONFIG_ARM_OABI.*//' \
-e 's/.*CONFIG_ARM_EABI.*/CONFIG_ARM_EABI=y/' '' else ""; -e 's/.*CONFIG_ARM_EABI.*/CONFIG_ARM_EABI=y/' '' else "";
enableBigEndian = (target != null && target.bigEndian); enableBigEndian = (cross != null && cross.bigEndian);
configBigEndian = if enableBigEndian then "" configBigEndian = if enableBigEndian then ""
else else
@ -19,16 +19,16 @@ let
-e 's/.*ARCH_WANTS_BIG_ENDIAN.*/#ARCH_WANTS_BIG_ENDIAN=y/' \ -e 's/.*ARCH_WANTS_BIG_ENDIAN.*/#ARCH_WANTS_BIG_ENDIAN=y/' \
-e 's/.*ARCH_WANTS_LITTLE_ENDIAN.*/ARCH_WANTS_LITTLE_ENDIAN=y/' ''; -e 's/.*ARCH_WANTS_LITTLE_ENDIAN.*/ARCH_WANTS_LITTLE_ENDIAN=y/' '';
archMakeFlag = if (target != null) then "ARCH=${target.arch}" else ""; archMakeFlag = if (cross != null) then "ARCH=${cross.arch}" else "";
crossMakeFlag = if (target != null) then "CROSS=${target.config}-" else ""; crossMakeFlag = if (cross != null) then "CROSS=${cross.config}-" else "";
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "uclibc-0.9.30.1" + stdenv.lib.optionalString (target != null) name = "uclibc-0.9.30.2" + stdenv.lib.optionalString (cross != null)
("-" + target.config); ("-" + cross.config);
src = fetchurl { src = fetchurl {
url = http://www.uclibc.org/downloads/uClibc-0.9.30.1.tar.bz2; url = http://www.uclibc.org/downloads/uClibc-0.9.30.2.tar.bz2;
sha256 = "132cf27hkgi0q4qlwbiyj4ffj76sja0jcxm0aqzzgks65jh6k5rd"; sha256 = "0wr4hlybssiyswdc73wdcxr31xfbss3lnqiv5lcav3rg3v4r4vmb";
}; };
configurePhase = '' configurePhase = ''
@ -46,21 +46,16 @@ stdenv.mkDerivation {
''; '';
# Cross stripping hurts. # Cross stripping hurts.
dontStrip = if (target != null) then true else false; dontStrip = if (cross != null) then true else false;
makeFlags = [ crossMakeFlag "VERBOSE=1" ]; makeFlags = [ crossMakeFlag "VERBOSE=1" ];
buildInputs = stdenv.lib.optional (gccCross != null) gccCross; buildInputs = stdenv.lib.optional (gccCross != null) gccCross;
patches = [ ./unifdef-getline.patch ];
# This will allow the usual gcc-cross-wrapper strip phase work as usual
crossConfig = if (target != null) then target.config else null;
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out
make PREFIX=$out VERBOSE=1 install ${crossMakeFlag} make PREFIX=$out VERBOSE=1 install ${crossMakeFlag}
(cd $out/include && ln -s ${linuxHeaders}/include/* .) || exit 1 (cd $out/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .)
sed -i s@/lib/@$out/lib/@g $out/lib/libc.so sed -i s@/lib/@$out/lib/@g $out/lib/libc.so
''; '';

View File

@ -1,31 +0,0 @@
diff --git a/extra/scripts/unifdef.c b/extra/scripts/unifdef.c
index 552025e..977e682 100644
--- a/extra/scripts/unifdef.c
+++ b/extra/scripts/unifdef.c
@@ -206,7 +206,7 @@ static void done(void);
static void error(const char *);
static int findsym(const char *);
static void flushline(bool);
-static Linetype getline(void);
+static Linetype parseline(void);
static Linetype ifeval(const char **);
static void ignoreoff(void);
static void ignoreon(void);
@@ -512,7 +512,7 @@ process(void)
for (;;) {
linenum++;
- lineval = getline();
+ lineval = parseline();
trans_table[ifstate[depth]][lineval]();
debug("process %s -> %s depth %d",
linetype_name[lineval],
@@ -526,7 +526,7 @@ process(void)
* help from skipcomment().
*/
static Linetype
-getline(void)
+parseline(void)
{
const char *cp;
int cursym;

View File

@ -144,7 +144,7 @@ in
[ xorg.libpciaccess xorg.inputproto xorg.xextproto xorg.randrproto ]; [ xorg.libpciaccess xorg.inputproto xorg.xextproto xorg.randrproto ];
postInstall = postInstall =
'' ''
rm -rf $out/share/X11/xkb/compiled rm -fr $out/share/X11/xkb/compiled
ln -s /var/tmp $out/share/X11/xkb/compiled ln -s /var/tmp $out/share/X11/xkb/compiled
''; '';
}; };

View File

@ -0,0 +1,29 @@
{ stdenv, fetchurl, ruby, makeWrapper }:
stdenv.mkDerivation {
name = "s3sync-1.2.6";
src = fetchurl {
url = http://s3.amazonaws.com/ServEdge_pub/s3sync/s3sync.tar.gz; # !!!
sha256 = "19467mgym0da0hifhkcbivccdima7gkaw3k8q760ilfbwgwxcn7f";
};
buildInputs = [ makeWrapper ];
installPhase =
''
ensureDir $out/libexec/s3sync
cp *.rb $out/libexec/s3sync
makeWrapper "${ruby}/bin/ruby $out/libexec/s3sync/s3cmd.rb" $out/bin/s3cmd
makeWrapper "${ruby}/bin/ruby $out/libexec/s3sync/s3sync.rb" $out/bin/s3sync
ensureDir $out/share/doc/s3sync
cp README* $out/share/doc/s3sync/
''; # */
meta = {
homepage = http://s3sync.net/;
description = "Command-line tools to manipulate Amazon S3 buckets";
license = "free-non-copyleft";
};
}

View File

@ -1491,6 +1491,10 @@ let
inherit fetchurl stdenv pkgconfig fuse curl expat; inherit fetchurl stdenv pkgconfig fuse curl expat;
}; };
s3sync = import ../tools/networking/s3sync {
inherit fetchurl stdenv ruby makeWrapper;
};
sablotron = import ../tools/text/xml/sablotron { sablotron = import ../tools/text/xml/sablotron {
inherit fetchurl stdenv expat; inherit fetchurl stdenv expat;
}; };
@ -3736,9 +3740,14 @@ let
installLocales = getPkgConfig "glibc" "locales" false; installLocales = getPkgConfig "glibc" "locales" false;
}); });
glibcCross = glibc211Cross;
# We can choose: # We can choose:
libcCross = glibc211Cross; libcCrossChooser = name : if (name == "glibc") then glibcCross
# libcCross = uclibcCross; else if (name == "uclibc") then uclibcCross
else throw "Unknown libc";
libcCross = libcCrossChooser crossSystem.libc;
eglibc = import ../development/libraries/eglibc { eglibc = import ../development/libraries/eglibc {
inherit fetchsvn stdenv; inherit fetchsvn stdenv;
@ -6391,10 +6400,11 @@ let
}; };
*/ */
uclibcCross = target: import ../os-specific/linux/uclibc { uclibcCross = import ../os-specific/linux/uclibc {
inherit fetchurl stdenv; inherit fetchurl stdenv;
linuxHeaders = linuxHeadersCross target; linuxHeaders = linuxHeadersCross;
gccCross = gccCrossStageStatic target; gccCross = gccCrossStageStatic;
cross = assert crossSystem != null; crossSystem;
}; };
udev = makeOverridable (import ../os-specific/linux/udev) { udev = makeOverridable (import ../os-specific/linux/udev) {

View File

@ -1,5 +1,31 @@
with (import ./release-lib.nix); with (import ./release-lib.nix);
let
nativePlatforms = linux;
/* Basic list of packages to cross-build */
basicHostDrv = {
bison.hostDrv = nativePlatforms;
tightvnc.hostDrv = nativePlatforms;
#openoffice.hostDrv = nativePlatforms;
wxGTK.hostDrv = nativePlatforms;
#firefox = nativePlatforms;
xorg = {
#xorgserver.hostDrv = nativePlatforms;
};
nixUnstable.hostDrv = nativePlatforms;
linuxPackages_2_6_32.kernel.hostDrv = linux;
linuxPackages_2_6_33.kernel.hostDrv = linux;
};
/* Basic list of packages to be natively built,
but need a crossSystem defined to get meaning */
basicBuildDrv = {
gdbCross = nativePlatforms;
};
basic = basicHostDrv // basicBuildDrv;
in
( (
/* Test some cross builds to the Sheevaplug */ /* Test some cross builds to the Sheevaplug */
@ -11,25 +37,37 @@ let
float = "soft"; float = "soft";
withTLS = true; withTLS = true;
platform = pkgs.platforms.sheevaplug; platform = pkgs.platforms.sheevaplug;
libc = "glibc";
openssl.system = "linux-generic32"; openssl.system = "linux-generic32";
}; };
nativePlatforms = linux;
in { in {
crossSheevaplugLinux = mapTestOnCross crossSystem (rec { crossSheevaplugLinux = mapTestOnCross crossSystem (
bison = nativePlatforms; basic //
tightvnc = nativePlatforms; {
#openoffice = nativePlatforms; ubootSheevaplug.hostDrv = nativePlatforms;
wxGTK = nativePlatforms; });
#firefox = nativePlatforms; }) // (
xorg = {
#xorgserver = nativePlatforms; /* Test some cross builds to the Sheevaplug - uclibc*/
}; let
nixUnstable = linux; crossSystem = {
linuxPackages_2_6_32.kernel = linux; config = "armv5tel-unknown-linux-gnueabi";
linuxPackages_2_6_33.kernel = linux; bigEndian = false;
gdbCross = nativePlatforms; arch = "arm";
gcc44_real.gcc = linux; float = "soft";
}); withTLS = true;
platform = pkgs.platforms.sheevaplug;
libc = "uclibc";
openssl.system = "linux-generic32";
};
in {
crossSheevaplugLinuxUclibc = mapTestOnCross crossSystem (
basic //
{
ubootSheevaplug.hostDrv = nativePlatforms;
});
}) // ( }) // (
/* Test some cross builds to the mipsel */ /* Test some cross builds to the mipsel */
@ -40,6 +78,7 @@ let
arch = "mips"; arch = "mips";
float = "soft"; float = "soft";
withTLS = true; withTLS = true;
libc = "glibc";
platform = { platform = {
name = "malta"; name = "malta";
kernelBaseConfig = "malta_defconfig"; kernelBaseConfig = "malta_defconfig";
@ -51,23 +90,8 @@ let
}; };
openssl.system = "linux-generic32"; openssl.system = "linux-generic32";
}; };
nativePlatforms = linux;
in { in {
crossMipselLinux = mapTestOnCross crossSystem (rec { crossMipselLinux = mapTestOnCross crossSystem basic;
bison = nativePlatforms;
tightvnc = nativePlatforms;
#openoffice = nativePlatforms;
wxGTK = nativePlatforms;
#firefox = nativePlatforms;
xorg = {
#xorgserver = nativePlatforms;
};
nixUnstable = linux;
linuxPackages_2_6_32.kernel = linux;
linuxPackages_2_6_33.kernel = linux;
gdbCross = nativePlatforms;
gcc44_real.gcc = linux;
});
}) // ( }) // (
/* Test some cross builds to the ultrasparc */ /* Test some cross builds to the ultrasparc */
@ -79,6 +103,7 @@ let
float = "hard"; float = "hard";
withTLS = true; withTLS = true;
cpu = "ultrasparc"; cpu = "ultrasparc";
libc = "glibc";
platform = { platform = {
name = "ultrasparc"; name = "ultrasparc";
kernelHeadersBaseConfig = "sparc64_defconfig"; kernelHeadersBaseConfig = "sparc64_defconfig";
@ -90,21 +115,6 @@ let
}; };
openssl.system = "linux64-sparcv9"; openssl.system = "linux64-sparcv9";
}; };
nativePlatforms = linux;
in { in {
crossUltraSparcLinux = mapTestOnCross crossSystem (rec { crossUltraSparcLinux = mapTestOnCross crossSystem basic;
bison = nativePlatforms;
tightvnc = nativePlatforms;
#openoffice = nativePlatforms;
wxGTK = nativePlatforms;
#firefox = nativePlatforms;
xorg = {
#xorgserver = nativePlatforms;
};
nixUnstable = linux;
linuxPackages_2_6_32.kernel = linux;
linuxPackages_2_6_33.kernel = linux;
gdbCross = nativePlatforms;
gcc44_real.gcc = linux;
});
}) })

View File

@ -52,13 +52,13 @@ rec {
(path: value: (path: value:
let let
job = toJob value; job = toJob value;
getPkg = pkgs: setCrossMaintainers getPkg = pkgs: (pkgs.lib.addMetaAttrs {
(pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; } schedulingPriority = toString job.schedulingPriority;
(pkgs.lib.getAttrFromPath (path ++ ["hostDrv"]) pkgs)); maintainers = crossMaintainers;
}
(pkgs.lib.getAttrFromPath path pkgs));
in testOnCross crossSystem job.systems getPkg); in testOnCross crossSystem job.systems getPkg);
setCrossMaintainers = pkg: pkg // { meta.maintainers = crossMaintainers; };
/* Find all packages that have a meta.platforms field listing the /* Find all packages that have a meta.platforms field listing the
supported platforms. */ supported platforms. */
packagesWithMetaPlatform = attrSet: packagesWithMetaPlatform = attrSet: