2006-10-19 20:03:13 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
pkgs = import ../../top-level/all-packages.nix {};
|
|
|
|
|
2006-10-23 22:20:25 +02:00
|
|
|
|
|
|
|
# Have to do removeAttrs to prevent all-packages from copying
|
|
|
|
# stdenv-linux's dependencies, rather than building new ones with
|
|
|
|
# dietlibc.
|
|
|
|
pkgsToRemove =
|
|
|
|
[ "binutils" "gcc" "coreutils" "findutils" "diffutils" "gnused" "gnugrep"
|
|
|
|
"gawk" "gnutar" "gzip" "bzip2" "gnumake" "bash" "patch" "patchelf"
|
|
|
|
];
|
|
|
|
|
2006-10-19 20:03:13 +02:00
|
|
|
pkgsDiet = import ../../top-level/all-packages.nix {
|
2006-10-23 22:20:25 +02:00
|
|
|
bootStdenv = removeAttrs (pkgs.useDietLibC pkgs.stdenv) pkgsToRemove;
|
2006-10-19 20:03:13 +02:00
|
|
|
};
|
|
|
|
|
2006-10-23 22:20:25 +02:00
|
|
|
pkgsStatic = import ../../top-level/all-packages.nix {
|
|
|
|
bootStdenv = removeAttrs (pkgs.makeStaticBinaries pkgs.stdenv) pkgsToRemove;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-10-19 20:03:13 +02:00
|
|
|
generator = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "bootstrap-tools-generator";
|
|
|
|
builder = ./make-bootstrap-tools.sh;
|
2006-10-27 22:08:53 +02:00
|
|
|
|
2006-10-20 22:57:31 +02:00
|
|
|
inherit (pkgsDiet)
|
2006-10-27 22:08:53 +02:00
|
|
|
coreutils findutils diffutils gnugrep
|
|
|
|
gzip bzip2 gnumake bash patch binutils;
|
2006-10-23 22:20:25 +02:00
|
|
|
|
2006-10-20 22:05:26 +02:00
|
|
|
gnused = pkgsDiet.gnused412; # 4.1.5 gives "Memory exhausted" errors
|
2006-10-23 22:20:25 +02:00
|
|
|
|
|
|
|
# patchelf is C++, won't work with dietlibc.
|
|
|
|
inherit (pkgsStatic) patchelf;
|
|
|
|
|
2006-10-24 19:24:04 +02:00
|
|
|
gnutar =
|
|
|
|
# Tar seems to be broken on dietlibc on x86_64.
|
|
|
|
if pkgs.stdenv.system == "i686-linux"
|
|
|
|
then pkgsDiet.gnutar
|
|
|
|
else pkgsStatic.gnutar;
|
|
|
|
|
2006-10-23 22:20:25 +02:00
|
|
|
gawk =
|
2006-10-23 22:16:37 +02:00
|
|
|
# Dietlibc only provides sufficient math functions (fmod, sin,
|
|
|
|
# cos, etc.) on i686. On other platforms, use Glibc.
|
|
|
|
if pkgs.stdenv.system == "i686-linux"
|
|
|
|
then pkgsDiet.gawk
|
2006-10-23 22:20:25 +02:00
|
|
|
else pkgsStatic.gawk;
|
|
|
|
|
2006-10-27 22:08:53 +02:00
|
|
|
gcc = import ../../development/compilers/gcc-4.1-temp {
|
2006-10-24 13:36:19 +02:00
|
|
|
inherit (pkgs) fetchurl stdenv;
|
2006-10-24 20:26:23 +02:00
|
|
|
noSysDirs = true;
|
2006-10-20 13:16:15 +02:00
|
|
|
langCC = false;
|
2006-10-24 20:26:23 +02:00
|
|
|
staticCompiler = true;
|
2006-10-20 13:16:15 +02:00
|
|
|
};
|
|
|
|
|
2006-10-19 23:36:51 +02:00
|
|
|
curl = pkgsDiet.realCurl;
|
2006-10-19 20:03:13 +02:00
|
|
|
|
2006-10-20 14:50:45 +02:00
|
|
|
glibc = pkgs.glibc;
|
|
|
|
|
2006-10-19 20:03:13 +02:00
|
|
|
# The result should not contain any references (store paths) so
|
|
|
|
# that we can safely copy them out of the store and to other
|
|
|
|
# locations in the store.
|
|
|
|
allowedReferences = [];
|
|
|
|
};
|
|
|
|
|
2006-10-27 22:14:19 +02:00
|
|
|
in generator.gnutar
|