diff options
Diffstat (limited to 'pkgs/stdenv/nix-linux-static/default.nix')
-rw-r--r-- | pkgs/stdenv/nix-linux-static/default.nix | 115 |
1 files changed, 60 insertions, 55 deletions
diff --git a/pkgs/stdenv/nix-linux-static/default.nix b/pkgs/stdenv/nix-linux-static/default.nix index e8c6a93a27c4a..f8121fb540231 100644 --- a/pkgs/stdenv/nix-linux-static/default.nix +++ b/pkgs/stdenv/nix-linux-static/default.nix @@ -11,7 +11,11 @@ rec { args = [ ./scripts/curl-unpack ]; }; - download = {url, pkgname, postprocess ? null, extra ? null, extra2 ? null, extra3 ? null, extra4? null, patchelf ? null}: derivation { + download = + { url, pkgname, postProcess ? [], addToPath ? [] + , extra ? null, extra2 ? null + , extra3 ? null, extra4? null, patchelf ? null}: + derivation { name = pkgname; builder = ./bash-static/bash; tar = ./gnutar-static/bin/tar; @@ -20,68 +24,85 @@ rec { cp = ./tools/cp; system = "i686-linux"; args = [ ./scripts/download-script ]; - inherit postprocess extra extra2 extra3 extra4 patchelf; + inherit postProcess addToPath extra extra2 extra3 extra4 patchelf; }; -/* - - glibc = derivation { - name = "glibc"; - builder = ./bash-static/bash; - tar = ./gnutar-static/bin/tar; - glibc_src = ./glibc-2.3.3.tar.bz2; - glibc_threads_src = ./glibc-linuxthreads-2.3.3.tar.bz2; - patch1 = ./no-unit-at-a-time.patch; - patch2 = ./fixup.patch; - inherit bzip2 gnumake binutils gcc coreutils gnused diffutils gnugrep gawk linuxHeaders patch; - gzip_path = ./gzip-static/bin; - system = "i686-linux"; - args = [ ./scripts/glibc-build ]; + coreutils = download { + url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/coreutils-5.0-static.tar.gz; + pkgname = "coreutils"; }; -*/ - - 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";}; + 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";}; + gnumake = download { + url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/make-3.80-static.tar.gz; + pkgname = "gnumake"; + }; - binutils = download {url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/binutils-2.15-static.tar.gz; pkgname = "binutils";}; + binutils = download { + url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/binutils-2.15-static.tar.gz; + pkgname = "binutils"; + }; - diffutils = download {url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/diffutils-2.8.1-static.tar.gz; pkgname = "diffutils";}; + 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";}; + 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";}; + 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; pkgname = "gcc";}) // - { langC = true; langCC = false; langF77 = false; }; + gcc = (download {url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/gcc-3.4.2-static.tar.gz; + pkgname = "gcc"; + postProcess = [./scripts/fix-outpath.sh]; + addToPath = [coreutils findutils gnused]; + }) // { 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";}; + 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";}; + 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";}; + 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";}; + 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; pkgname = "glibc"; patchelf = ./patchelf-static/bin/patchelf; - extra3 = findutils; - extra4 = gnused; - postprocess = ./scripts/add-symlink.sh; + postProcess = [./scripts/add-symlink.sh /* ./scripts/fix-outpath.sh */]; + addToPath = [coreutils findutils gnused]; extra = linuxHeaders; - extra2 = coreutils; }; + stdenvInitial = let { - body = derivation { + body = derivation { name = "stdenv-linux-static-initial"; system = "i686-linux"; builder = ./bash-static/bash; @@ -100,8 +121,9 @@ rec { }; - stdenvBootFun = {glibc, gcc, binutils}: (import ../generic) { + stdenvBootFun = {glibc, gcc, binutils, staticGlibc}: (import ../generic) { name = "stdenv-linux-static-boot"; + param1 = if staticGlibc then "static" else "dynamic"; preHook = ./prehook.sh; stdenv = stdenvInitial; shell = ./bash-static/bash; @@ -126,21 +148,4 @@ rec { ./patchelf-static ]; }; - -/* - stdenvBoot = stdenvBootFun {inherit glibc;}; - - fetchurl = (import ../../build-support/fetchurl) { - stdenv = stdenvBoot; - inherit curl; - }; - - aterm = (import ../../development/libraries/aterm) { - stdenv = stdenvBoot; - inherit fetchurl; - }; - - body = [coreutils bzip2 gnumake binutils diffutils gcc glibc gnused gnugrep diffutils gawk]; -*/ - } |