diff --git a/pkgs/misc/tex/texlive/default.nix b/pkgs/misc/tex/texlive/default.nix index 7a14ba90887..eadabb9b339 100644 --- a/pkgs/misc/tex/texlive/default.nix +++ b/pkgs/misc/tex/texlive/default.nix @@ -60,11 +60,9 @@ rec { HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees # Prebuild the format files, as it used to be done with TeXLive 2007. - # Note the funny argument parser of `mktexfmt', which wants something - # ending in `.fmt' as its first argument. + echo "building format files..." ensureDir "$out/texmf-var/web2c" - PATH="$PATH:$out/bin" mktexfmt does-not-matter.fmt \ - --fmtdir="$out/texmf-var/web2c" --all + PATH="$PATH:$out/bin" fmtutil-sys --all PATH=$PATH:$out/bin mktexlsr $out/texmf* '') ["minInit" "defEnsureDir" "doUnpack" "doMakeInstall"]; diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix index 3390469545f..0811e8e3e80 100644 --- a/pkgs/os-specific/linux/uclibc/default.nix +++ b/pkgs/os-specific/linux/uclibc/default.nix @@ -1,17 +1,17 @@ -{stdenv, fetchurl, linuxHeaders, gccCross ? null}: +{stdenv, fetchurl, linuxHeaders, cross ? null, gccCross ? null}: assert stdenv.isLinux; +assert cross != null -> gccCross != null; let - target = if (gccCross != null) then gccCross.target else null; - enableArmEABI = (target == null && stdenv.system "armv5tel-linux") - || (target != null && target.arch == "arm"); + enableArmEABI = (cross == null && stdenv.platform.kernelArch == "arm") + || (cross != null && cross.arch == "arm"); configArmEABI = if enableArmEABI then ''-e 's/.*CONFIG_ARM_OABI.*//' \ -e 's/.*CONFIG_ARM_EABI.*/CONFIG_ARM_EABI=y/' '' else ""; - enableBigEndian = (target != null && target.bigEndian); + enableBigEndian = (cross != null && cross.bigEndian); configBigEndian = if enableBigEndian then "" else @@ -19,16 +19,16 @@ let -e 's/.*ARCH_WANTS_BIG_ENDIAN.*/#ARCH_WANTS_BIG_ENDIAN=y/' \ -e 's/.*ARCH_WANTS_LITTLE_ENDIAN.*/ARCH_WANTS_LITTLE_ENDIAN=y/' ''; - archMakeFlag = if (target != null) then "ARCH=${target.arch}" else ""; - crossMakeFlag = if (target != null) then "CROSS=${target.config}-" else ""; + archMakeFlag = if (cross != null) then "ARCH=${cross.arch}" else ""; + crossMakeFlag = if (cross != null) then "CROSS=${cross.config}-" else ""; in stdenv.mkDerivation { - name = "uclibc-0.9.30.1" + stdenv.lib.optionalString (target != null) - ("-" + target.config); + name = "uclibc-0.9.30.2" + stdenv.lib.optionalString (cross != null) + ("-" + cross.config); src = fetchurl { - url = http://www.uclibc.org/downloads/uClibc-0.9.30.1.tar.bz2; - sha256 = "132cf27hkgi0q4qlwbiyj4ffj76sja0jcxm0aqzzgks65jh6k5rd"; + url = http://www.uclibc.org/downloads/uClibc-0.9.30.2.tar.bz2; + sha256 = "0wr4hlybssiyswdc73wdcxr31xfbss3lnqiv5lcav3rg3v4r4vmb"; }; configurePhase = '' @@ -46,21 +46,16 @@ stdenv.mkDerivation { ''; # Cross stripping hurts. - dontStrip = if (target != null) then true else false; + dontStrip = if (cross != null) then true else false; makeFlags = [ crossMakeFlag "VERBOSE=1" ]; 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 = '' mkdir -p $out 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 ''; diff --git a/pkgs/os-specific/linux/uclibc/unifdef-getline.patch b/pkgs/os-specific/linux/uclibc/unifdef-getline.patch deleted file mode 100644 index 7e6a50014a3..00000000000 --- a/pkgs/os-specific/linux/uclibc/unifdef-getline.patch +++ /dev/null @@ -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; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 4e8466f2621..e8a311a651a 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -144,7 +144,7 @@ in [ xorg.libpciaccess xorg.inputproto xorg.xextproto xorg.randrproto ]; postInstall = '' - rm -rf $out/share/X11/xkb/compiled + rm -fr $out/share/X11/xkb/compiled ln -s /var/tmp $out/share/X11/xkb/compiled ''; }; diff --git a/pkgs/tools/networking/s3sync/default.nix b/pkgs/tools/networking/s3sync/default.nix new file mode 100644 index 00000000000..8ed71c34523 --- /dev/null +++ b/pkgs/tools/networking/s3sync/default.nix @@ -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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9098162664a..04f2d450f1b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1491,6 +1491,10 @@ let inherit fetchurl stdenv pkgconfig fuse curl expat; }; + s3sync = import ../tools/networking/s3sync { + inherit fetchurl stdenv ruby makeWrapper; + }; + sablotron = import ../tools/text/xml/sablotron { inherit fetchurl stdenv expat; }; @@ -3736,9 +3740,14 @@ let installLocales = getPkgConfig "glibc" "locales" false; }); + glibcCross = glibc211Cross; + # We can choose: - libcCross = glibc211Cross; - # libcCross = uclibcCross; + libcCrossChooser = name : if (name == "glibc") then glibcCross + else if (name == "uclibc") then uclibcCross + else throw "Unknown libc"; + + libcCross = libcCrossChooser crossSystem.libc; eglibc = import ../development/libraries/eglibc { inherit fetchsvn stdenv; @@ -6391,10 +6400,11 @@ let }; */ - uclibcCross = target: import ../os-specific/linux/uclibc { + uclibcCross = import ../os-specific/linux/uclibc { inherit fetchurl stdenv; - linuxHeaders = linuxHeadersCross target; - gccCross = gccCrossStageStatic target; + linuxHeaders = linuxHeadersCross; + gccCross = gccCrossStageStatic; + cross = assert crossSystem != null; crossSystem; }; udev = makeOverridable (import ../os-specific/linux/udev) { diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 12293f5ba9c..fdac71e2da3 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -1,5 +1,31 @@ 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 */ @@ -11,25 +37,37 @@ let float = "soft"; withTLS = true; platform = pkgs.platforms.sheevaplug; + libc = "glibc"; openssl.system = "linux-generic32"; }; - nativePlatforms = linux; + in { - crossSheevaplugLinux = mapTestOnCross crossSystem (rec { - 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; - }); + crossSheevaplugLinux = mapTestOnCross crossSystem ( + basic // + { + ubootSheevaplug.hostDrv = nativePlatforms; + }); +}) // ( + +/* Test some cross builds to the Sheevaplug - uclibc*/ +let + crossSystem = { + config = "armv5tel-unknown-linux-gnueabi"; + bigEndian = false; + arch = "arm"; + 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 */ @@ -40,6 +78,7 @@ let arch = "mips"; float = "soft"; withTLS = true; + libc = "glibc"; platform = { name = "malta"; kernelBaseConfig = "malta_defconfig"; @@ -51,23 +90,8 @@ let }; openssl.system = "linux-generic32"; }; - nativePlatforms = linux; in { - crossMipselLinux = mapTestOnCross crossSystem (rec { - 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; - }); + crossMipselLinux = mapTestOnCross crossSystem basic; }) // ( /* Test some cross builds to the ultrasparc */ @@ -79,6 +103,7 @@ let float = "hard"; withTLS = true; cpu = "ultrasparc"; + libc = "glibc"; platform = { name = "ultrasparc"; kernelHeadersBaseConfig = "sparc64_defconfig"; @@ -90,21 +115,6 @@ let }; openssl.system = "linux64-sparcv9"; }; - nativePlatforms = linux; in { - crossUltraSparcLinux = mapTestOnCross crossSystem (rec { - 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; - }); + crossUltraSparcLinux = mapTestOnCross crossSystem basic; }) diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 91f99c59bfe..64530930ee5 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -52,13 +52,13 @@ rec { (path: value: let job = toJob value; - getPkg = pkgs: setCrossMaintainers - (pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; } - (pkgs.lib.getAttrFromPath (path ++ ["hostDrv"]) pkgs)); + getPkg = pkgs: (pkgs.lib.addMetaAttrs { + schedulingPriority = toString job.schedulingPriority; + maintainers = crossMaintainers; + } + (pkgs.lib.getAttrFromPath path pkgs)); in testOnCross crossSystem job.systems getPkg); - setCrossMaintainers = pkg: pkg // { meta.maintainers = crossMaintainers; }; - /* Find all packages that have a meta.platforms field listing the supported platforms. */ packagesWithMetaPlatform = attrSet: