Merge 'staging' into multiple-outputs
Conflicts: pkgs/applications/audio/flac/default.nix pkgs/build-support/gcc-wrapper/builder.sh pkgs/development/libraries/apr-util/default.nix pkgs/development/libraries/apr/default.nix pkgs/development/libraries/atk/default.nix pkgs/development/libraries/freetype/default.nix pkgs/development/libraries/gdk-pixbuf/default.nix pkgs/development/libraries/glib/default.nix pkgs/development/libraries/glibc/2.17/builder.sh pkgs/development/libraries/glibc/2.17/locales.nix pkgs/development/libraries/libjpeg/default.nix pkgs/development/libraries/libogg/default.nix pkgs/development/libraries/libsamplerate/default.nix pkgs/development/libraries/libtiff/default.nix pkgs/development/libraries/libvorbis/default.nix pkgs/development/libraries/mesa/default.nix pkgs/development/libraries/pango/default.nix pkgs/development/web/nodejs/default.nix pkgs/os-specific/linux/pam/default.nix pkgs/os-specific/linux/systemd/default.nix pkgs/stdenv/generic/setup.sh pkgs/stdenv/linux/default.nix pkgs/top-level/all-packages.nix pkgs/top-level/release-small.nix
This commit is contained in:
44
pkgs/stdenv/linux/bootstrap/armv5tel.nix
Normal file
44
pkgs/stdenv/linux/bootstrap/armv5tel.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
let
|
||||
|
||||
fetch = { file, sha256 }: import <nix/fetchurl.nix> {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/r18744/${file}";
|
||||
inherit sha256;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
in {
|
||||
sh = fetch {
|
||||
file = "sh";
|
||||
sha256 = "1kv3gc8h209rjc5i0rzzc4pjxq23kzq25iff89in05c9vl20mn4n";
|
||||
};
|
||||
|
||||
bzip2 = fetch {
|
||||
file = "bzip2";
|
||||
sha256 = "090jrj099wl33q0iq092iljilam39pv8acli59m2af0fa9z0d9f0";
|
||||
};
|
||||
|
||||
mkdir = fetch {
|
||||
file = "mkdir";
|
||||
sha256 = "01s8myfvi559dsxvbanxw71vxzjv49k4gi1qh0ak6l0qx0xq602b";
|
||||
};
|
||||
|
||||
cpio = fetch {
|
||||
file = "cpio";
|
||||
sha256 = "07snc8l0mn84w2xrvdmc5yfpmlbrvl2bar8wipbpvm43nzz2qbzs";
|
||||
};
|
||||
|
||||
ln = fetch {
|
||||
file = "ln";
|
||||
sha256 = "0m9fz02bashpfgwfkxmrp4wa8a5r3il52bclvf6z36vsam0vx56d";
|
||||
};
|
||||
|
||||
curl = fetch {
|
||||
file = "curl.bz2";
|
||||
sha256 = "19yqdjqi31zlnqn8ss2ml60iq2a1vrwfw6dmvjqp6qbxmh7yb8n8";
|
||||
};
|
||||
|
||||
bootstrapTools = {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/r18744/bootstrap-tools.cpio.bz2";
|
||||
sha256 = "1rn4n5kilqmv62dfjfcscbsm0w329k3gyb2v9155fsi1sl2cfzcb";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
{
|
||||
sh = ./sh;
|
||||
bzip2 = ./bzip2;
|
||||
mkdir = ./mkdir;
|
||||
cpio = ./cpio;
|
||||
ln = ./ln;
|
||||
curl = ./curl.bz2;
|
||||
|
||||
bootstrapTools = {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/r18744/bootstrap-tools.cpio.bz2";
|
||||
sha256 = "1rn4n5kilqmv62dfjfcscbsm0w329k3gyb2v9155fsi1sl2cfzcb";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,11 +1,7 @@
|
||||
{
|
||||
sh = ../armv5tel/sh;
|
||||
bzip2 = ../armv5tel/bzip2;
|
||||
mkdir = ../armv5tel/mkdir;
|
||||
cpio = ../armv5tel/cpio;
|
||||
ln = ../armv5tel/ln;
|
||||
curl = ../armv5tel/curl.bz2;
|
||||
# Use the static tools for armv5tel-linux.
|
||||
(import ./armv5tel.nix) //
|
||||
|
||||
{
|
||||
bootstrapTools = {
|
||||
# Built from make-bootstrap-tools-crosspi.nix
|
||||
# nixpkgs rev eb0422e4c1263a65a9b2b954fe10a1e03d67db3e
|
||||
@@ -1,3 +0,0 @@
|
||||
# rely on ARM backward compatibility to build armv7l binaries with the
|
||||
# bootstrap tools of armv5tel.
|
||||
import ../armv5tel
|
||||
39
pkgs/stdenv/linux/bootstrap/i686.nix
Normal file
39
pkgs/stdenv/linux/bootstrap/i686.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
let
|
||||
|
||||
fetch = { file, sha256 }: import <nix/fetchurl.nix> {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/i686/r24519/${file}";
|
||||
inherit sha256;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
in {
|
||||
sh = fetch {
|
||||
file = "sh";
|
||||
sha256 = "1l6sdhyqjlh4m5gj3pfpi8aisp1m012lpwxfcc4v1x8g429mflmy";
|
||||
};
|
||||
|
||||
bzip2 = fetch {
|
||||
file = "bzip2";
|
||||
sha256 = "1p5nkrdn52jm6rsx8x3wwjpsh83f2qsjl1qckkgnkplwhj23zjp7";
|
||||
};
|
||||
|
||||
mkdir = fetch {
|
||||
file = "mkdir";
|
||||
sha256 = "02ff7i9ph9ahiapsg2v9c3pwr7sl73sk4n7ic112ljkrgwkail33";
|
||||
};
|
||||
|
||||
cpio = fetch {
|
||||
file = "cpio";
|
||||
sha256 = "046if3aqqramyhrn2yxrjf4bfkl8x1bcqxhvi7ml9nrv9smx8irg";
|
||||
};
|
||||
|
||||
curl = fetch {
|
||||
file = "curl.bz2";
|
||||
sha256 = "1v0yfb4gcdyqpl2fxlxjh337r28c23iqm7vwck4p4643xd55di7q";
|
||||
};
|
||||
|
||||
bootstrapTools = {
|
||||
url = http://tarballs.nixos.org/stdenv-linux/i686/r24519/bootstrap-tools.cpio.bz2;
|
||||
sha256 = "0imypaxy6piwbk8ff2y1nr7yk49pqmdgdbv6g8miq1zs5yfip6ij";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
{
|
||||
sh = ./sh;
|
||||
bzip2 = ./bzip2;
|
||||
mkdir = ./mkdir;
|
||||
cpio = ./cpio;
|
||||
ln = ./ln;
|
||||
curl = ./curl.bz2;
|
||||
|
||||
bootstrapTools = {
|
||||
url = http://tarballs.nixos.org/stdenv-linux/i686/r24519/bootstrap-tools.cpio.bz2;
|
||||
sha256 = "0imypaxy6piwbk8ff2y1nr7yk49pqmdgdbv6g8miq1zs5yfip6ij";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
44
pkgs/stdenv/linux/bootstrap/loongson2f.nix
Normal file
44
pkgs/stdenv/linux/bootstrap/loongson2f.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
let
|
||||
|
||||
fetch = { file, sha256 }: import <nix/fetchurl.nix> {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/${file}";
|
||||
inherit sha256;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
in {
|
||||
sh = fetch {
|
||||
file = "sh";
|
||||
sha256 = "02jjl49wdq85pgh61aqf78yaknn9mi3rcspbpk7hs9c4mida2rhf";
|
||||
};
|
||||
|
||||
bzip2 = fetch {
|
||||
file = "bzip2";
|
||||
sha256 = "1qn27y3amj9c6mnjk2kyb59y0d2w4yv16z9apaxx91hyq19gf29z";
|
||||
};
|
||||
|
||||
mkdir = fetch {
|
||||
file = "mkdir";
|
||||
sha256 = "1vbp2bv9hkyb2fwl8hjrffpywn1wrl1kc4yrwi2lirawlnc6kymh";
|
||||
};
|
||||
|
||||
cpio = fetch {
|
||||
file = "cpio";
|
||||
sha256 = "0mqxwdx0sl7skxx6049mk35l7d0fnibqsv174284kdp4p7iixwa0";
|
||||
};
|
||||
|
||||
ln = fetch {
|
||||
file = "ln";
|
||||
sha256 = "05lwx8qvga3yv8xhs8bjgsfygsfrcxsfck0lxw6gsdckx25fgi7s";
|
||||
};
|
||||
|
||||
curl = fetch {
|
||||
file = "curl.bz2";
|
||||
sha256 = "0iblnz4my54gryac04i64fn3ksi9g3dx96yjq93fj39z6kx6151c";
|
||||
};
|
||||
|
||||
bootstrapTools = {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/cross-bootstrap-tools.cpio.bz2";
|
||||
sha256 = "00aavbk76qjj2gdlmpaaj66r8nzl4d7pyl8cv1gigyzgpbr5vv3j";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
{
|
||||
sh = ./sh;
|
||||
bzip2 = ./bzip2;
|
||||
mkdir = ./mkdir;
|
||||
cpio = ./cpio;
|
||||
ln = ./ln;
|
||||
curl = ./curl.bz2;
|
||||
|
||||
bootstrapTools = {
|
||||
url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/cross-bootstrap-tools.cpio.bz2";
|
||||
sha256 = "00aavbk76qjj2gdlmpaaj66r8nzl4d7pyl8cv1gigyzgpbr5vv3j";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
{
|
||||
bash = ./bash;
|
||||
bzip2 = ./bzip2;
|
||||
cp = ./cp;
|
||||
curl = ./curl.bz2;
|
||||
tar = ./tar.bz2;
|
||||
|
||||
staticToolsURL = {
|
||||
url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/static-tools.tar.bz2;
|
||||
sha1 = "e4d1680e3dfa752e49a996a31140db53b10061cb";
|
||||
};
|
||||
|
||||
binutilsURL = {
|
||||
url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/binutils.tar.bz2;
|
||||
sha1 = "2609f4d9277a60fcd178395d3d49911190e08f36";
|
||||
};
|
||||
|
||||
gccURL = {
|
||||
url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/gcc.tar.bz2;
|
||||
sha1 = "71d79d736bfef6252208fe6239e528a591becbed";
|
||||
};
|
||||
|
||||
glibcURL = {
|
||||
url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/glibc.tar.bz2;
|
||||
sha1 = "bf0245e16235800c8aa9c6a5de6565583a66e46d";
|
||||
};
|
||||
}
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
# Use the static tools for i686-linux. They work on x86_64-linux
|
||||
# machines as well.
|
||||
(import ../i686) //
|
||||
(import ./i686.nix) //
|
||||
|
||||
{
|
||||
bootstrapTools = {
|
||||
@@ -11,14 +11,15 @@
|
||||
|
||||
rec {
|
||||
|
||||
lib = import ../../../lib;
|
||||
|
||||
bootstrapFiles =
|
||||
if system == "i686-linux" then import ./bootstrap/i686
|
||||
else if system == "x86_64-linux" then import ./bootstrap/x86_64
|
||||
else if system == "powerpc-linux" then import ./bootstrap/powerpc
|
||||
else if system == "armv5tel-linux" then import ./bootstrap/armv5tel
|
||||
else if system == "armv6l-linux" then import ./bootstrap/armv6l
|
||||
else if system == "armv7l-linux" then import ./bootstrap/armv5tel
|
||||
else if system == "mips64el-linux" then import ./bootstrap/loongson2f
|
||||
if system == "i686-linux" then import ./bootstrap/i686.nix
|
||||
else if system == "x86_64-linux" then import ./bootstrap/x86_64.nix
|
||||
else if system == "armv5tel-linux" then import ./bootstrap/armv5tel.nix
|
||||
else if system == "armv6l-linux" then import ./bootstrap/armv6l.nix
|
||||
else if system == "armv7l-linux" then import ./bootstrap/armv6l.nix
|
||||
else if system == "mips64el-linux" then import ./bootstrap/loongson2f.nix
|
||||
else abort "unsupported platform for the pure Linux stdenv";
|
||||
|
||||
|
||||
@@ -38,19 +39,6 @@ rec {
|
||||
# of coreutils, GCC, etc.
|
||||
|
||||
|
||||
# This function downloads a file.
|
||||
download = {url, sha256}: derivation {
|
||||
name = baseNameOf (toString url);
|
||||
builder = bootstrapFiles.sh;
|
||||
inherit system url;
|
||||
inherit (bootstrapFiles) bzip2 mkdir curl cpio ln;
|
||||
args = [ ./scripts/download.sh ];
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = sha256;
|
||||
impureEnvVars = [ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" ];
|
||||
};
|
||||
|
||||
|
||||
# Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
|
||||
bootstrapTools = derivation {
|
||||
name = "bootstrap-tools";
|
||||
@@ -58,13 +46,15 @@ rec {
|
||||
builder = bootstrapFiles.sh;
|
||||
|
||||
args =
|
||||
if (system == "armv5tel-linux" || system == "armv6l-linux")
|
||||
if system == "armv5tel-linux" || system == "armv6l-linux"
|
||||
|| system == "armv7l-linux"
|
||||
then [ ./scripts/unpack-bootstrap-tools-arm.sh ]
|
||||
else [ ./scripts/unpack-bootstrap-tools.sh ];
|
||||
|
||||
# FIXME: get rid of curl.
|
||||
inherit (bootstrapFiles) bzip2 mkdir curl cpio;
|
||||
|
||||
tarball = download {
|
||||
tarball = import <nix/fetchurl.nix> {
|
||||
inherit (bootstrapFiles.bootstrapTools) url sha256;
|
||||
};
|
||||
|
||||
@@ -133,9 +123,9 @@ rec {
|
||||
|
||||
# A helper function to call gcc-wrapper.
|
||||
wrapGCC =
|
||||
{gcc ? bootstrapTools, libc, binutils, coreutils, shell ? "", name ? "bootstrap-gcc-wrapper"}:
|
||||
{ gcc ? bootstrapTools, libc, binutils, coreutils, shell ? "", name ? "bootstrap-gcc-wrapper" }:
|
||||
|
||||
import ../../build-support/gcc-wrapper {
|
||||
lib.makeOverridable (import ../../build-support/gcc-wrapper) {
|
||||
nativeTools = false;
|
||||
nativeLibc = false;
|
||||
inherit gcc binutils coreutils libc shell name;
|
||||
@@ -165,12 +155,14 @@ rec {
|
||||
bootStdenv = stdenvLinuxBoot1;
|
||||
};
|
||||
|
||||
binutils1 = stdenvLinuxBoot1Pkgs.binutils.override { gold = false; };
|
||||
|
||||
# 3) 2nd stdenv that we will use to build only the glibc.
|
||||
|
||||
# 3) 2nd stdenv that we will use to build only Glibc.
|
||||
stdenvLinuxBoot2 = stdenvBootFun {
|
||||
gcc = wrapGCC {
|
||||
libc = bootstrapGlibc;
|
||||
binutils = stdenvLinuxBoot1Pkgs.binutils;
|
||||
binutils = binutils1;
|
||||
coreutils = bootstrapTools;
|
||||
};
|
||||
overrides = pkgs: {
|
||||
@@ -181,7 +173,7 @@ rec {
|
||||
|
||||
|
||||
# 4) These are the packages that we can build with the 2nd
|
||||
# stdenv. We only need Glibc (in step 5).
|
||||
# stdenv.
|
||||
stdenvLinuxBoot2Pkgs = allPackages {
|
||||
inherit system platform;
|
||||
bootStdenv = stdenvLinuxBoot2;
|
||||
@@ -198,7 +190,7 @@ rec {
|
||||
# binutils and the rest of the bootstrap tools, including GCC.
|
||||
stdenvLinuxBoot3 = stdenvBootFun {
|
||||
gcc = wrapGCC {
|
||||
binutils = stdenvLinuxBoot1Pkgs.binutils;
|
||||
binutils = binutils1;
|
||||
coreutils = bootstrapTools;
|
||||
libc = stdenvLinuxGlibc;
|
||||
};
|
||||
@@ -215,6 +207,10 @@ rec {
|
||||
cloog = pkgs.cloog.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
ppl = pkgs.ppl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
|
||||
};
|
||||
extraAttrs = {
|
||||
glibc = stdenvLinuxGlibc; # Required by gcc47 build
|
||||
};
|
||||
extraPath = [ stdenvLinuxBoot1Pkgs.paxctl ];
|
||||
inherit fetchurl;
|
||||
};
|
||||
|
||||
@@ -227,12 +223,11 @@ rec {
|
||||
|
||||
|
||||
# 8) Construct a fourth stdenv identical to the second, except that
|
||||
# this one uses the dynamically linked GCC and Binutils from step
|
||||
# 5. The other tools (e.g. coreutils) are still from the
|
||||
# bootstrap tools.
|
||||
# this one uses the new GCC from step 7. The other tools
|
||||
# (e.g. coreutils) are still from the bootstrap tools.
|
||||
stdenvLinuxBoot4 = stdenvBootFun {
|
||||
gcc = wrapGCC rec {
|
||||
inherit (stdenvLinuxBoot3Pkgs) binutils;
|
||||
binutils = binutils1;
|
||||
coreutils = bootstrapTools;
|
||||
libc = stdenvLinuxGlibc;
|
||||
gcc = stdenvLinuxBoot3Pkgs.gcc.gcc;
|
||||
@@ -254,9 +249,9 @@ rec {
|
||||
};
|
||||
|
||||
|
||||
# 10) Construct the final stdenv. It uses the Glibc, GCC and
|
||||
# Binutils built above, and adds in dynamically linked versions
|
||||
# of all other tools.
|
||||
# 10) Construct the final stdenv. It uses the Glibc and GCC, and
|
||||
# adds in a new binutils that doesn't depend on bootstrap-tools,
|
||||
# as well as dynamically linked versions of all other tools.
|
||||
#
|
||||
# When updating stdenvLinux, make sure that the result has no
|
||||
# dependency (`nix-store -qR') on bootstrapTools or the
|
||||
@@ -264,15 +259,20 @@ rec {
|
||||
stdenvLinux = import ../generic rec {
|
||||
inherit system config;
|
||||
|
||||
preHook = commonPreHook;
|
||||
preHook =
|
||||
''
|
||||
# Make "strip" produce deterministic output, by setting
|
||||
# timestamps etc. to a fixed value.
|
||||
commonStripFlags="--enable-deterministic-archives"
|
||||
${commonPreHook}
|
||||
'';
|
||||
|
||||
initialPath =
|
||||
((import ../common-path.nix) {pkgs = stdenvLinuxBoot4Pkgs;})
|
||||
++ [stdenvLinuxBoot4Pkgs.patchelf];
|
||||
++ [stdenvLinuxBoot4Pkgs.patchelf stdenvLinuxBoot4Pkgs.paxctl ];
|
||||
|
||||
gcc = wrapGCC rec {
|
||||
inherit (stdenvLinuxBoot3Pkgs) binutils;
|
||||
inherit (stdenvLinuxBoot4Pkgs) coreutils;
|
||||
inherit (stdenvLinuxBoot4Pkgs) binutils coreutils;
|
||||
libc = stdenvLinuxGlibc;
|
||||
gcc = stdenvLinuxBoot4.gcc.gcc;
|
||||
shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash";
|
||||
@@ -291,11 +291,12 @@ rec {
|
||||
|
||||
overrides = pkgs: {
|
||||
inherit gcc;
|
||||
inherit (stdenvLinuxBoot3Pkgs) binutils glibc;
|
||||
inherit (stdenvLinuxBoot3Pkgs) glibc;
|
||||
inherit (stdenvLinuxBoot4Pkgs) binutils;
|
||||
inherit (stdenvLinuxBoot4Pkgs)
|
||||
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
||||
gnumake gnused gnutar gnugrep gnupatch patchelf
|
||||
attr acl pcre;
|
||||
attr acl pcre paxctl;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ let
|
||||
patch = pkgs.patch.crossDrv;
|
||||
patchelf = pkgs.patchelf.crossDrv;
|
||||
replace = pkgs.replace.crossDrv;
|
||||
gcc = pkgs.gcc47;
|
||||
gcc = pkgs.gcc;
|
||||
gmp = pkgs.gmp.crossDrv;
|
||||
mpfr = pkgs.mpfr.crossDrv;
|
||||
ppl = pkgs.ppl.crossDrv;
|
||||
@@ -83,7 +83,7 @@ let
|
||||
isl = pkgs.isl.crossDrv;
|
||||
mpc = pkgs.mpc.crossDrv;
|
||||
binutils = pkgs.binutils.crossDrv;
|
||||
klibc = pkgs.klibc.crossDrv;
|
||||
klibc = pkgs.linuxPackages.klibc.crossDrv;
|
||||
|
||||
in
|
||||
|
||||
@@ -116,7 +116,7 @@ rec {
|
||||
|
||||
buildCommand = ''
|
||||
set -x
|
||||
ensureDir $out/bin $out/lib $out/libexec
|
||||
mkdir -p $out/bin $out/lib $out/libexec
|
||||
|
||||
# Copy what we need of Glibc.
|
||||
cp -d ${glibc}/lib/ld-*.so* $out/lib
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
set -e
|
||||
|
||||
$ln -s $curl curl.bz2
|
||||
$bzip2 -d -f curl.bz2
|
||||
./curl --version
|
||||
|
||||
echo "downloading $out from $url"
|
||||
./curl --fail --location --max-redirs 20 "$url" > "$out"
|
||||
Reference in New Issue
Block a user