diff --git a/pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.bz2 b/pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.bz2 new file mode 100644 index 00000000000..4867f7aaf61 Binary files /dev/null and b/pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.bz2 differ diff --git a/pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.gz b/pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.gz deleted file mode 100644 index 92e40e7ea19..00000000000 Binary files a/pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.gz and /dev/null differ diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index f202f0ad7c7..8067dfed1de 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -17,11 +17,11 @@ rec { # binary which is unpacked here. curl = derivation { name = "curl"; - builder = ./bash-static/bash; - tar = ./gnutar-static/bin/tar; - gunzip = ./gzip-static/bin/gunzip; - curl = ./curl-static/curl-7.12.2-static.tar.gz; + builder = ./tools/bash; + tar = ./tools/tar; + bunzip2 = ./tools/bunzip2; cp = ./tools/cp; + curl = ./curl-static/curl-7.12.2-static.tar.bz2; system = "i686-linux"; args = [ ./scripts/curl-unpack ]; }; @@ -33,11 +33,11 @@ rec { , extra3 ? null, extra4? null, patchelf ? null}: derivation { name = pkgname; - builder = ./bash-static/bash; - tar = ./gnutar-static/bin/tar; - gunzip = ./gzip-static/bin/gunzip; - inherit curl url; + builder = ./tools/bash; + tar = ./tools/tar; + bunzip2 = ./tools/bunzip2; cp = ./tools/cp; + inherit curl url; system = "i686-linux"; args = [ ./scripts/download-script ]; inherit postProcess addToPath extra extra2 extra3 extra4 patchelf; @@ -45,97 +45,48 @@ rec { # The various statically linked components that make up the standard # environment. - coreutils = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/coreutils-5.0-static.tar.gz; - pkgname = "coreutils"; - }; - - patchelf = ./patchelf-static/bin/patchelf; - - bzip2 = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/bzip2-1.0.2-static.tar.gz; - pkgname = "bzip2"; - }; - - gnumake = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/make-3.80-static.tar.gz; - pkgname = "gnumake"; + staticTools = download { + url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/////static.tar.bz2; + pkgname = "static-tools"; }; binutils = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/binutils-2.15-static.tar.gz; + url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/binutils-2.15-static.tar.bz2; pkgname = "binutils"; }; - diffutils = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/diffutils-2.8.1-static.tar.gz; - pkgname = "diffutils"; - }; - - gnused = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/sed-4.0.7-static.tar.gz; - pkgname = "gnused"; - }; - - gnugrep = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/grep-2.5.1-static.tar.gz; - pkgname = "gnugrep"; - }; - - gcc = (download {url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/gcc-3.4.2-static.tar.gz; + gcc = (download {url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/gcc-3.4.2-static.tar.bz2; pkgname = "gcc"; postProcess = [./scripts/fix-outpath.sh]; - addToPath = [coreutils findutils gnused]; + addToPath = [staticTools]; }) // { langC = true; langCC = false; langF77 = false; }; - gawk = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/gawk-3.1.3-static.tar.gz; - pkgname = "gawk"; - }; - - patch = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/patch-2.5.4-static.tar.gz; - pkgname = "patch"; - }; - - findutils = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/findutils-4.1.20-static.tar.gz; - pkgname = "findutils"; - }; - - linuxHeaders = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/linux-headers-2.4.25-i386.tar.gz; - pkgname = "linux-headers"; - }; - glibc = download { - url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/glibc-2.3.3-static-2.tar.gz; + url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/glibc-2.3.3-static.tar.bz2; pkgname = "glibc"; - patchelf = ./patchelf-static/bin/patchelf; - postProcess = [./scripts/add-symlink.sh ./scripts/fix-outpath.sh]; - addToPath = [coreutils findutils gnused]; - extra = linuxHeaders; + postProcess = [./scripts/fix-outpath.sh]; + addToPath = [staticTools]; }; # The "fake" standard environment used to build "real" standard - # environments. It consists of just bash, coreutils, and sed, which - # is all that is needed by ../generic/builder.sh. + # environments. It consists of just the basic statically linked + # tools. stdenvInitial = let { body = derivation { - name = "stdenv-linux-static-initial"; + name = "stdenv-linux-initial"; system = "i686-linux"; - builder = ./bash-static/bash; + builder = ./tools/bash; args = ./scripts/builder-stdenv-initial.sh; - inherit coreutils gnused; + inherit staticTools; } // { mkDerivation = attrs: derivation (attrs // { - builder = ./bash-static/bash; + builder = ./tools/bash; args = ["-e" attrs.builder]; stdenv = body; system = body.system; }); - shell = ./bash-static/bash; + shell = ./tools/bash; }; }; @@ -143,11 +94,11 @@ rec { # This function builds the various standard environments used during # the bootstrap. stdenvBootFun = {glibc, gcc, binutils, staticGlibc}: (import ../generic) { - name = "stdenv-linux-static-boot"; + name = "stdenv-linux-boot"; param1 = if staticGlibc then "static" else "dynamic"; preHook = ./prehook.sh; stdenv = stdenvInitial; - shell = ./bash-static/bash; + shell = ./tools/bash; gcc = (import ../../build-support/gcc-wrapper) { stdenv = stdenvInitial; nativeTools = false; @@ -155,18 +106,7 @@ rec { inherit gcc glibc binutils; }; initialPath = [ - coreutils - ./gnutar-static - ./gzip-static - bzip2 - gnused - gnugrep - gawk - gnumake - findutils - diffutils - patch - ./patchelf-static + staticTools ]; }; @@ -225,7 +165,7 @@ rec { # Binutils built above, and adds in dynamically linked versions # of all other tools. stdenvLinux = (import ../generic) { - name = "stdenv-nix-linux"; + name = "stdenv-linux"; preHook = ./prehook.sh; initialPath = [ ((import ../nix/path.nix) {pkgs = stdenvLinuxBoot3Pkgs;}) diff --git a/pkgs/stdenv/linux/gzip-static/bin/gunzip b/pkgs/stdenv/linux/gzip-static/bin/gunzip deleted file mode 100755 index c6059153306..00000000000 Binary files a/pkgs/stdenv/linux/gzip-static/bin/gunzip and /dev/null differ diff --git a/pkgs/stdenv/linux/scripts/add-symlink.sh b/pkgs/stdenv/linux/scripts/add-symlink.sh deleted file mode 100644 index ff2716f21d3..00000000000 --- a/pkgs/stdenv/linux/scripts/add-symlink.sh +++ /dev/null @@ -1,13 +0,0 @@ -chmod u+w $out/include -(cd $out/include && ln -s $extra/include/* .) || exit 1 - -cd $out -find . -not -type l -exec $extra2/bin/chmod u+w {} \; -find . -exec $patchelf --interpreter $out/lib/ld-linux.so.2 --shrink-rpath {} \; || true - -$extra2/bin/rm -rf bin - -$extra2/bin/cat ./lib/libc.so | $extra4/bin/sed "s|/nix/store/[a-z0-9]*-glibc|$out|g" > ./lib/libc.so -$extra2/bin/cat ./lib/libpthread.so | $extra4/bin/sed "s|/nix/store/[a-z0-9]*-glibc|$out|g" > ./lib/libpthread.so - -rm $out/lib/*.so* diff --git a/pkgs/stdenv/linux/scripts/builder-stdenv-initial.sh b/pkgs/stdenv/linux/scripts/builder-stdenv-initial.sh index bb9728af6dd..eca7adfac74 100644 --- a/pkgs/stdenv/linux/scripts/builder-stdenv-initial.sh +++ b/pkgs/stdenv/linux/scripts/builder-stdenv-initial.sh @@ -6,5 +6,5 @@ PATH=$coreutils/bin mkdir $out cat > $out/setup < .tmp -$gunzip -d < .tmp | $tar xvf - +$bunzip2 -d < .tmp | $tar xvf - $cp -prd * $out diff --git a/pkgs/stdenv/linux/bash-static/bash b/pkgs/stdenv/linux/tools/bash similarity index 100% rename from pkgs/stdenv/linux/bash-static/bash rename to pkgs/stdenv/linux/tools/bash diff --git a/pkgs/stdenv/linux/tools/bunzip2 b/pkgs/stdenv/linux/tools/bunzip2 new file mode 100755 index 00000000000..14fbed32a09 Binary files /dev/null and b/pkgs/stdenv/linux/tools/bunzip2 differ diff --git a/pkgs/stdenv/linux/gnutar-static/bin/tar b/pkgs/stdenv/linux/tools/tar similarity index 100% rename from pkgs/stdenv/linux/gnutar-static/bin/tar rename to pkgs/stdenv/linux/tools/tar