* Add more stuff to the bootstrap builder.
* Remove some redundant *Diet values in all-packages.nix. svn path=/nixpkgs/trunk/; revision=6780
This commit is contained in:
parent
fc56793b67
commit
c6ecc900cf
@ -7,13 +7,14 @@ let
|
|||||||
# stdenv-linux's dependencies, rather than building new ones with
|
# stdenv-linux's dependencies, rather than building new ones with
|
||||||
# dietlibc.
|
# dietlibc.
|
||||||
bootStdenv = removeAttrs (pkgs.useDietLibC pkgs.stdenv)
|
bootStdenv = removeAttrs (pkgs.useDietLibC pkgs.stdenv)
|
||||||
["bash" "bzip2" "coreutils"];
|
["bash" "bzip2" "coreutils" "gnutar" "patchelf"];
|
||||||
};
|
};
|
||||||
|
|
||||||
generator = pkgs.stdenv.mkDerivation {
|
generator = pkgs.stdenv.mkDerivation {
|
||||||
name = "bootstrap-tools-generator";
|
name = "bootstrap-tools-generator";
|
||||||
builder = ./make-bootstrap-tools.sh;
|
builder = ./make-bootstrap-tools.sh;
|
||||||
inherit (pkgsDiet) bash bzip2 coreutils;
|
inherit (pkgsDiet) bash bzip2 coreutils gnutar;
|
||||||
|
curl = pkgsDiet.realCurl;
|
||||||
|
|
||||||
# The result should not contain any references (store paths) so
|
# The result should not contain any references (store paths) so
|
||||||
# that we can safely copy them out of the store and to other
|
# that we can safely copy them out of the store and to other
|
||||||
|
@ -3,6 +3,11 @@ source $stdenv/setup
|
|||||||
ensureDir $out/in-nixpkgs
|
ensureDir $out/in-nixpkgs
|
||||||
ensureDir $out/on-server
|
ensureDir $out/on-server
|
||||||
|
|
||||||
|
# Everything we put in check-only is merely to allow Nix to check that
|
||||||
|
# we aren't putting binaries with store path references in tarballs.
|
||||||
|
ensureDir $out/check-only
|
||||||
|
|
||||||
|
|
||||||
nukeRefs() {
|
nukeRefs() {
|
||||||
# Dirty, disgusting, but it works ;-)
|
# Dirty, disgusting, but it works ;-)
|
||||||
fileName=$1
|
fileName=$1
|
||||||
@ -11,11 +16,35 @@ nukeRefs() {
|
|||||||
mv $fileName.tmp $fileName
|
mv $fileName.tmp $fileName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cp $bash/bin/bash $out/in-nixpkgs
|
cp $bash/bin/bash $out/in-nixpkgs
|
||||||
cp $bzip2/bin/bunzip2 $out/in-nixpkgs
|
cp $bzip2/bin/bunzip2 $out/in-nixpkgs
|
||||||
cp $coreutils/bin/cp $out/in-nixpkgs
|
cp $gnutar/bin/tar $out/in-nixpkgs
|
||||||
|
cp $curl/bin/curl $out/check-only
|
||||||
|
bzip2 < $curl/bin/curl > $out/in-nixpkgs/curl.bz2
|
||||||
|
|
||||||
nukeRefs $out/in-nixpkgs/bash
|
nukeRefs $out/in-nixpkgs/bash
|
||||||
|
nukeRefs $out/in-nixpkgs/tar
|
||||||
|
|
||||||
chmod +w $out/in-nixpkgs/*
|
for i in $out/in-nixpkgs/*; do
|
||||||
strip -s $out/in-nixpkgs/*
|
if test -x $i; then
|
||||||
|
chmod +w $i
|
||||||
|
strip -s $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
mkdir tools
|
||||||
|
mkdir tools/bin
|
||||||
|
|
||||||
|
cp $coreutils/bin/* tools/bin
|
||||||
|
rm tools/bin/groups # has references
|
||||||
|
rm tools/bin/printf # idem
|
||||||
|
|
||||||
|
#cp $patchelf/bin/* tools/bin
|
||||||
|
tar cvfj $out/on-server/static-tools.tar.bz2 tools
|
||||||
|
|
||||||
|
|
||||||
|
for i in $out/on-server/*.tar.bz2; do
|
||||||
|
(cd $out/check-only && tar xvfj $i)
|
||||||
|
done
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{stdenv, fetchurl, dietgcc}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "gnutar-1.15.1";
|
|
||||||
src = fetchurl {
|
|
||||||
url = http://nix.cs.uu.nl/dist/tarballs/tar-1.15.1.tar.bz2;
|
|
||||||
md5 = "57da3c38f8e06589699548a34d5a5d07";
|
|
||||||
};
|
|
||||||
NIX_GCC = dietgcc;
|
|
||||||
NIX_GLIBC_FLAGS_SET=1;
|
|
||||||
NIX_CFLAGS_COMPILE="-D_BSD_SOURCE=1";
|
|
||||||
}
|
|
@ -1,17 +1,26 @@
|
|||||||
{stdenv, fetchurl, zlib, sslSupport ? false, openssl ? null}:
|
{stdenv, fetchurl, zlibSupport ? false, zlib, sslSupport ? false, openssl ? null}:
|
||||||
|
|
||||||
|
assert zlibSupport -> zlib != null;
|
||||||
assert sslSupport -> openssl != null;
|
assert sslSupport -> openssl != null;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation ({
|
||||||
name = "curl-7.15.5";
|
name = "curl-7.15.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://nix.cs.uu.nl/dist/tarballs/curl-7.15.5.tar.bz2;
|
url = http://nix.cs.uu.nl/dist/tarballs/curl-7.15.5.tar.bz2;
|
||||||
md5 = "594142c7d53bbdd988e8cef6354eeeff";
|
md5 = "594142c7d53bbdd988e8cef6354eeeff";
|
||||||
};
|
};
|
||||||
buildInputs = [zlib (if sslSupport then openssl else null)];
|
buildInputs =
|
||||||
|
(if zlibSupport then [zlib] else [])
|
||||||
|
++ (if sslSupport then [openssl] else []);
|
||||||
patches = [./configure-cxxcpp.patch];
|
patches = [./configure-cxxcpp.patch];
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
${if sslSupport then "--with-ssl=${openssl}" else "--without-ssl"}
|
${if sslSupport then "--with-ssl=${openssl}" else "--without-ssl"}
|
||||||
";
|
";
|
||||||
inherit sslSupport openssl;
|
inherit sslSupport openssl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (if stdenv ? isDietLibC then {
|
||||||
|
CFLAGS = "-DHAVE_INET_NTOA_R_2_ARGS=1";
|
||||||
|
} else {})
|
||||||
|
|
||||||
|
)
|
||||||
|
@ -206,11 +206,6 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
});
|
});
|
||||||
|
|
||||||
bzip2Diet = import ../tools/compression/bzip2 {
|
|
||||||
inherit fetchurl;
|
|
||||||
stdenv = useDietLibC stdenv;
|
|
||||||
};
|
|
||||||
|
|
||||||
cabextract = import ../tools/archivers/cabextract {
|
cabextract = import ../tools/archivers/cabextract {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
@ -224,24 +219,12 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
});
|
});
|
||||||
|
|
||||||
coreutilsDiet = import ../tools/misc/coreutils {
|
|
||||||
inherit fetchurl;
|
|
||||||
stdenv = useDietLibC stdenv;
|
|
||||||
};
|
|
||||||
|
|
||||||
cpio = import ../tools/archivers/cpio {
|
cpio = import ../tools/archivers/cpio {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
curl = if stdenv ? curl then stdenv.curl else (assert false; null);
|
curl = if stdenv ? curl then stdenv.curl else (assert false; null);
|
||||||
|
|
||||||
curlDiet = import ../tools/networking/curl {
|
|
||||||
inherit fetchurl zlib;
|
|
||||||
stdenv = addAttrsToDerivation {
|
|
||||||
CFLAGS = "-DHAVE_INET_NTOA_R_2_ARGS=1";
|
|
||||||
} (useDietLibC stdenv);
|
|
||||||
};
|
|
||||||
|
|
||||||
dhcp = import ../tools/networking/dhcp {
|
dhcp = import ../tools/networking/dhcp {
|
||||||
inherit fetchurl stdenv groff nettools coreutils iputils gnused bash;
|
inherit fetchurl stdenv groff nettools coreutils iputils gnused bash;
|
||||||
};
|
};
|
||||||
@ -321,10 +304,6 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
});
|
});
|
||||||
|
|
||||||
gnutarDiet = import ../tools/archivers/gnutar-diet {
|
|
||||||
inherit fetchurl stdenv dietgcc;
|
|
||||||
};
|
|
||||||
|
|
||||||
graphviz = import ../tools/graphics/graphviz {
|
graphviz = import ../tools/graphics/graphviz {
|
||||||
inherit fetchurl stdenv libpng libjpeg expat x11 yacc libtool;
|
inherit fetchurl stdenv libpng libjpeg expat x11 yacc libtool;
|
||||||
inherit (xlibs) libXaw;
|
inherit (xlibs) libXaw;
|
||||||
@ -428,6 +407,7 @@ rec {
|
|||||||
|
|
||||||
realCurl = import ../tools/networking/curl {
|
realCurl = import ../tools/networking/curl {
|
||||||
inherit fetchurl stdenv zlib;
|
inherit fetchurl stdenv zlib;
|
||||||
|
zlibSupport = !stdenv ? isDietLibC;
|
||||||
};
|
};
|
||||||
|
|
||||||
sablotron = import ../tools/text/xml/sablotron {
|
sablotron = import ../tools/text/xml/sablotron {
|
||||||
@ -513,11 +493,6 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
});
|
});
|
||||||
|
|
||||||
bashDiet = import ../shells/bash {
|
|
||||||
inherit fetchurl;
|
|
||||||
stdenv = useDietLibC stdenv;
|
|
||||||
};
|
|
||||||
|
|
||||||
tcsh = import ../shells/tcsh {
|
tcsh = import ../shells/tcsh {
|
||||||
inherit fetchurl stdenv ncurses;
|
inherit fetchurl stdenv ncurses;
|
||||||
};
|
};
|
||||||
@ -1674,6 +1649,7 @@ rec {
|
|||||||
|
|
||||||
zlib = import ../development/libraries/zlib {
|
zlib = import ../development/libraries/zlib {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
|
static = !stdenv ? isDietLibC;
|
||||||
};
|
};
|
||||||
|
|
||||||
zlibStatic = import ../development/libraries/zlib {
|
zlibStatic = import ../development/libraries/zlib {
|
||||||
|
Loading…
Reference in New Issue
Block a user