From 41a9a00c9bf6c6f88da5b2e1d214083b8d41e056 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Tue, 19 Oct 2004 15:16:14 +0000 Subject: [PATCH] commit a whole bunch of statically linked packages. In the builder we add gzip to the PATH, because tar expects it to be there. This *should* be enough to bootstrap a whole new environment inside UML, give or take one or two packages I might have forgotten :) svn path=/nixpkgs/trunk/; revision=1584 --- .../coreutils-static/builder.sh | 8 +++ .../coreutils-static/default.nix | 9 +++ pkgs/stdenv/nix-linux-static/default.nix | 22 +++++++ .../diffutils-static/builder.sh | 8 +++ .../diffutils-static/default.nix | 9 +++ .../findutils-static/builder.sh | 8 +++ .../findutils-static/default.nix | 9 +++ .../nix-linux-static/gawk-static/builder.sh | 8 +++ .../nix-linux-static/gawk-static/default.nix | 9 +++ .../gnugrep-static/builder.sh | 8 +++ .../gnugrep-static/default.nix | 9 +++ .../gnumake-static/builder.sh | 8 +++ .../gnumake-static/default.nix | 9 +++ .../nix-linux-static/gnused-static/builder.sh | 8 +++ .../gnused-static/default.nix | 9 +++ pkgs/stdenv/nix-linux-static/path.nix | 13 ++++ pkgs/stdenv/nix-linux-static/pkgs.nix | 64 +++++++++++++++++++ 17 files changed, 218 insertions(+) create mode 100644 pkgs/stdenv/nix-linux-static/coreutils-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/coreutils-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/diffutils-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/diffutils-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/findutils-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/findutils-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/gawk-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/gawk-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/gnugrep-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/gnugrep-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/gnumake-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/gnumake-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/gnused-static/builder.sh create mode 100644 pkgs/stdenv/nix-linux-static/gnused-static/default.nix create mode 100644 pkgs/stdenv/nix-linux-static/path.nix create mode 100644 pkgs/stdenv/nix-linux-static/pkgs.nix diff --git a/pkgs/stdenv/nix-linux-static/coreutils-static/builder.sh b/pkgs/stdenv/nix-linux-static/coreutils-static/builder.sh new file mode 100644 index 000000000000..80ba81d451e0 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/coreutils-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a coreutils-5.0/* $out diff --git a/pkgs/stdenv/nix-linux-static/coreutils-static/default.nix b/pkgs/stdenv/nix-linux-static/coreutils-static/default.nix new file mode 100644 index 000000000000..89cf504353c0 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/coreutils-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "coreutils-static-5.0"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/coreutils-5.0-static.tar.gz; + tarball = "coreutils-5.0-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/default.nix b/pkgs/stdenv/nix-linux-static/default.nix new file mode 100644 index 000000000000..d4afccabe6ba --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/default.nix @@ -0,0 +1,22 @@ +{stdenv, glibc, pkgs, genericStdenv, gccWrapper}: + +genericStdenv { + name = "stdenv-nix-linux-static"; + preHook = ./prehook.sh; + initialPath = (import ./path.nix) {pkgs = (import ./pkgs.nix) {stdenv = stdenv;};}; + + inherit stdenv; + + gcc = gccWrapper { + #name = pkgs.gcc.name; + nativeTools = false; + nativeGlibc = false; + inherit (pkgs) binutils; + gcc = (import ./gcc-static) {stdenv = stdenv;}; + inherit stdenv glibc; + shell = pkgs.bash ~ /bin/sh; + }; + + shell = pkgs.bash ~ /bin/sh; + +} diff --git a/pkgs/stdenv/nix-linux-static/diffutils-static/builder.sh b/pkgs/stdenv/nix-linux-static/diffutils-static/builder.sh new file mode 100644 index 000000000000..603cc8ab7adc --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/diffutils-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a diffutils-2.8.1/* $out diff --git a/pkgs/stdenv/nix-linux-static/diffutils-static/default.nix b/pkgs/stdenv/nix-linux-static/diffutils-static/default.nix new file mode 100644 index 000000000000..786dd873303f --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/diffutils-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "diffutils-static-2.8.1"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/diffutils-2.8.1-static.tar.gz; + tarball = "diffutils-2.8.1-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/findutils-static/builder.sh b/pkgs/stdenv/nix-linux-static/findutils-static/builder.sh new file mode 100644 index 000000000000..9d5ac179ed1c --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/findutils-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a findutils-4.1.20/* $out diff --git a/pkgs/stdenv/nix-linux-static/findutils-static/default.nix b/pkgs/stdenv/nix-linux-static/findutils-static/default.nix new file mode 100644 index 000000000000..98b4691503eb --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/findutils-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "findutils-static-4.1.20"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/findutils-4.1.20-static.tar.gz; + tarball = "findutils-4.1.20-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/gawk-static/builder.sh b/pkgs/stdenv/nix-linux-static/gawk-static/builder.sh new file mode 100644 index 000000000000..8d55abd587d6 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gawk-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a gawk-3.1.3/* $out diff --git a/pkgs/stdenv/nix-linux-static/gawk-static/default.nix b/pkgs/stdenv/nix-linux-static/gawk-static/default.nix new file mode 100644 index 000000000000..e85111dbc44a --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gawk-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "gawk-static-3.1.3"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/gawk-3.1.3-static.tar.gz; + tarball = "gawk-3.1.3-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/gnugrep-static/builder.sh b/pkgs/stdenv/nix-linux-static/gnugrep-static/builder.sh new file mode 100644 index 000000000000..8290f078df39 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gnugrep-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a grep-2.5.1/* $out diff --git a/pkgs/stdenv/nix-linux-static/gnugrep-static/default.nix b/pkgs/stdenv/nix-linux-static/gnugrep-static/default.nix new file mode 100644 index 000000000000..e2c047ee3cc6 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gnugrep-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "gnugrep-static-2.5.1"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/grep-2.5.1-static.tar.gz; + tarball = "grep-2.5.1-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/gnumake-static/builder.sh b/pkgs/stdenv/nix-linux-static/gnumake-static/builder.sh new file mode 100644 index 000000000000..a0e79c73065b --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gnumake-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a make-3.80/* $out diff --git a/pkgs/stdenv/nix-linux-static/gnumake-static/default.nix b/pkgs/stdenv/nix-linux-static/gnumake-static/default.nix new file mode 100644 index 000000000000..f1df6b2074b0 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gnumake-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "gnumake-static-3.80"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/make-3.80-static.tar.gz; + tarball = "make-3.80-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/gnused-static/builder.sh b/pkgs/stdenv/nix-linux-static/gnused-static/builder.sh new file mode 100644 index 000000000000..b32cafc8a0e2 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gnused-static/builder.sh @@ -0,0 +1,8 @@ +. $stdenv/setup + +PATH=$gzip:$PATH + +$curl/bin/curl $src > $tarball +$tar/bin/tar zxvf $tarball +mkdir $out +cp -a sed-4.0.7/* $out diff --git a/pkgs/stdenv/nix-linux-static/gnused-static/default.nix b/pkgs/stdenv/nix-linux-static/gnused-static/default.nix new file mode 100644 index 000000000000..e22a28efdfe0 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/gnused-static/default.nix @@ -0,0 +1,9 @@ +{stdenv, gnutar, gzip, curl}: + +stdenv.mkDerivation { + inherit curl gzip gnutar; + name = "gnused-static-4.0.7"; + builder = ./builder.sh; + src = http://losser.st-lab.cs.uu.nl/~armijn/.nix/sed-4.0.7-static.tar.gz; + tarball = "sed-4.0.7-static.tar.gz"; +} diff --git a/pkgs/stdenv/nix-linux-static/path.nix b/pkgs/stdenv/nix-linux-static/path.nix new file mode 100644 index 000000000000..01b23f950976 --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/path.nix @@ -0,0 +1,13 @@ +{pkgs}: [ + pkgs.coreutils + pkgs.findutils + pkgs.diffutils + pkgs.gnused + pkgs.gnugrep + pkgs.gawk + pkgs.gnutar + pkgs.gzip + pkgs.bzip2 + pkgs.gnumake + pkgs.bash +] diff --git a/pkgs/stdenv/nix-linux-static/pkgs.nix b/pkgs/stdenv/nix-linux-static/pkgs.nix new file mode 100644 index 000000000000..52193ac526fa --- /dev/null +++ b/pkgs/stdenv/nix-linux-static/pkgs.nix @@ -0,0 +1,64 @@ +{stdenv}: + +rec { + + inherit stdenv; + + curl = (import ./curl-static) { + inherit stdenv; + }; + + ### TOOLS + coreutils = (import ./coreutils-static) { + inherit stdenv gnutar gzip curl; + }; + + findutils = (import ./findutils-static) { + inherit stdenv gnutar gzip curl; + }; + + diffutils = (import ./diffutils-static) { + inherit stdenv gnutar gzip curl; + }; + + gnused = (import ./gnused-static) { + inherit stdenv gnutar gzip curl; + }; + + gnugrep = (import ./gnugrep-static) { + inherit stdenv gnutar gzip curl; + }; + + gawk = (import ./gawk-static) { + inherit stdenv gnutar gzip curl; + }; + + gnutar = (import ./gnutar-static) { + inherit stdenv; + }; + + gzip = (import ./gzip-static) { + inherit stdenv; + }; + + bzip2 = (import ./bzip2-static) { + inherit stdenv gnutar gzip curl; + }; + + binutils = (import ./binutils-static) { + inherit stdenv gnutar gzip curl; + }; + + gnumake = (import ./gnumake-static) { + inherit stdenv gnutar gzip curl; + }; + + gcc = (import ./gcc-static) { + inherit stdenv; + }; + + bash = (import ./bash-static) { + inherit stdenv; + }; + +}