Merge branch 'master.upstream' into staging.upstream
This commit is contained in:
@@ -34,7 +34,7 @@ rec {
|
||||
build =
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "build";
|
||||
name = "stdenv-bootstrap-tools";
|
||||
|
||||
buildInputs = [nukeReferences cpio];
|
||||
|
||||
@@ -154,9 +154,19 @@ rec {
|
||||
allowedReferences = [];
|
||||
};
|
||||
|
||||
dist = stdenv.mkDerivation {
|
||||
name = "stdenv-bootstrap-tools";
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo "file tarball ${build}/on-server/bootstrap-tools.tar.xz" >> $out/nix-support/hydra-build-products
|
||||
echo "file busybox ${build}/on-server/busybox" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
};
|
||||
|
||||
test = ((import ./default.nix) {
|
||||
inherit system;
|
||||
|
||||
|
||||
customBootstrapFiles = {
|
||||
busybox = "${build}/on-server/busybox";
|
||||
bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz";
|
||||
|
||||
@@ -18,19 +18,19 @@ let
|
||||
"/usr/lib/system"
|
||||
];
|
||||
|
||||
fetch = { file, sha256 }: import <nix/fetchurl.nix> {
|
||||
url = "https://dl.dropboxusercontent.com/u/2857322/${file}";
|
||||
inherit sha256 system;
|
||||
executable = true;
|
||||
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
|
||||
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/4f07c88d467216d9692fefc951deb5cd3c4cc722/${file}";
|
||||
inherit sha256 system executable;
|
||||
};
|
||||
|
||||
bootstrapFiles = {
|
||||
sh = fetch { file = "sh"; sha256 = "1qakpg37vl61jnkplz13m3g1csqr85cg8ybp6jwiv6apmg26isnm"; };
|
||||
bzip2 = fetch { file = "bzip2"; sha256 = "1gxa67255q9v00j1vn1mzyrnbwys2g1102cx02vpcyvvrl4vqxr0"; };
|
||||
mkdir = fetch { file = "mkdir"; sha256 = "1yfl8w65ksji7fggrbvqxw8lp0gm02qilk11n9axj2jxay53ngvg"; };
|
||||
cpio = fetch { file = "cpio"; sha256 = "0nssyg19smgcblwq1mfcw4djbd85md84d2f093qcqkbigdjg484b"; };
|
||||
sh = fetch { file = "sh"; sha256 = "1siix3wakzil31r2cydmh3v8a1nyq4605dwiabqc5lx73j4xzrzi"; };
|
||||
bzip2 = fetch { file = "bzip2"; sha256 = "0zvqm977k11b5cl4ixxb5h0ds24g6z0f8m28z4pqxzpa353lqbla"; };
|
||||
mkdir = fetch { file = "mkdir"; sha256 = "13frk8lsfgzlb65p9l26cvxf06aag43yjk7vg9msn7ix3v8cmrg1"; };
|
||||
cpio = fetch { file = "cpio"; sha256 = "0ms5i9m1vdksj575sf1djwgm7zhnvfrrb44dxnfh9avr793rc2w4"; };
|
||||
};
|
||||
tarball = fetch { file = "bootstrap-tools.9.cpio.bz2"; sha256 = "1xim0wm4ld45ysdmgpsa6b1f6srdnfj054ilv86k0pa5plvcmsf4"; };
|
||||
|
||||
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "1lz1b0grl4642h6n635xvi6imf0yyy1zyzdr9ing5aphzz0z5iic"; executable = false; };
|
||||
in rec {
|
||||
allPackages = import ../../top-level/all-packages.nix;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{system ? builtins.currentSystem}:
|
||||
|
||||
with import ../../top-level/all-packages.nix {inherit system;};
|
||||
with import ../../top-level/all-packages.nix { system = "x86_64-darwin"; };
|
||||
|
||||
rec {
|
||||
# We want coreutils without ACL support.
|
||||
@@ -9,7 +7,7 @@ rec {
|
||||
});
|
||||
|
||||
build = stdenv.mkDerivation {
|
||||
name = "build";
|
||||
name = "stdenv-bootstrap-tools";
|
||||
|
||||
buildInputs = [nukeReferences cpio];
|
||||
|
||||
@@ -62,9 +60,10 @@ rec {
|
||||
cp -d ${openssl}/lib/*.dylib $out/lib
|
||||
|
||||
cp -d ${gnugrep.pcre}/lib/libpcre*.dylib $out/lib
|
||||
cp -d ${libiconv}/lib/libiconv*.dylib $out/lib
|
||||
cp -d ${libiconv}/lib/lib*.dylib $out/lib
|
||||
cp -d ${gettext}/lib/libintl*.dylib $out/lib
|
||||
chmod +x $out/lib/libintl*.dylib
|
||||
cp -d ${ncurses}/lib/libncurses*.dylib $out/lib
|
||||
|
||||
# Copy what we need of clang
|
||||
cp -d ${llvmPackages.clang-unwrapped}/bin/clang $out/bin
|
||||
@@ -117,7 +116,7 @@ rec {
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $out/bin/* $out/lib/*.dylib $out/lib/clang/3.5.0/lib/darwin/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do
|
||||
for i in $out/bin/* $out/lib/*.dylib $out/lib/clang/*/lib/darwin/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do
|
||||
if test -x $i -a ! -L $i; then
|
||||
echo "Adding rpath to $i"
|
||||
rpathify $i
|
||||
@@ -125,48 +124,45 @@ rec {
|
||||
done
|
||||
|
||||
nuke-refs $out/lib/*
|
||||
nuke-refs $out/lib/clang/3.5.0/lib/darwin/*
|
||||
nuke-refs $out/lib/clang/*/lib/darwin/*
|
||||
nuke-refs $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
|
||||
|
||||
set -x
|
||||
mkdir $out/.pack
|
||||
mv $out/* $out/.pack
|
||||
mv $out/.pack $out/pack
|
||||
|
||||
mkdir $out/on-server
|
||||
(cd $out/pack && (find | cpio -o -H newc)) | bzip2 > $out/on-server/bootstrap-tools.cpio.bz2
|
||||
cp ${stdenv.shell} $out/on-server/sh
|
||||
cp ${cpio}/bin/cpio $out/on-server
|
||||
cp ${coreutils_}/bin/mkdir $out/on-server
|
||||
cp ${bzip2}/bin/bzip2 $out/on-server
|
||||
|
||||
mkdir $out/in-nixpkgs
|
||||
cp ${stdenv.shell} $out/in-nixpkgs/sh
|
||||
cp ${cpio}/bin/cpio $out/in-nixpkgs
|
||||
cp ${coreutils_}/bin/mkdir $out/in-nixpkgs
|
||||
cp ${bzip2}/bin/bzip2 $out/in-nixpkgs
|
||||
chmod u+w $out/on-server/*
|
||||
strip $out/on-server/*
|
||||
nuke-refs $out/on-server/*
|
||||
|
||||
chmod u+w $out/in-nixpkgs/*
|
||||
strip $out/in-nixpkgs/*
|
||||
nuke-refs $out/in-nixpkgs/*
|
||||
|
||||
for i in $out/in-nixpkgs/*; do
|
||||
for i in $out/on-server/*; do
|
||||
fix_dyld $i
|
||||
done
|
||||
|
||||
(cd $out/pack && (find | cpio -o -H newc)) | bzip2 > $out/on-server/bootstrap-tools.cpio.bz2
|
||||
'';
|
||||
|
||||
allowedReferences = [];
|
||||
};
|
||||
|
||||
host = stdenv.mkDerivation {
|
||||
name = "host";
|
||||
dist = stdenv.mkDerivation {
|
||||
name = "stdenv-bootstrap-tools";
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/nix-support
|
||||
|
||||
for i in "${build}/on-server/"*; do
|
||||
echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
|
||||
done
|
||||
|
||||
echo "darwin-bootstrap-tools-$(date +%Y.%m.%d)" >> $out/nix-support/hydra-release-name
|
||||
echo "file tarball ${build}/on-server/bootstrap-tools.cpio.bz2" >> $out/nix-support/hydra-build-products
|
||||
echo "file sh ${build}/on-server/sh" >> $out/nix-support/hydra-build-products
|
||||
echo "file cpio ${build}/on-server/cpio" >> $out/nix-support/hydra-build-products
|
||||
echo "file mkdir ${build}/on-server/mkdir" >> $out/nix-support/hydra-build-products
|
||||
echo "file bzip2 ${build}/on-server/bzip2" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
||||
allowedReferences = [ build ];
|
||||
};
|
||||
|
||||
unpack = stdenv.mkDerivation {
|
||||
@@ -218,9 +214,9 @@ rec {
|
||||
|
||||
tarball = "${build}/on-server/bootstrap-tools.cpio.bz2";
|
||||
|
||||
mkdir = "${build}/in-nixpkgs/mkdir";
|
||||
bzip2 = "${build}/in-nixpkgs/bzip2";
|
||||
cpio = "${build}/in-nixpkgs/cpio";
|
||||
mkdir = "${build}/on-server/mkdir";
|
||||
bzip2 = "${build}/on-server/bzip2";
|
||||
cpio = "${build}/on-server/cpio";
|
||||
|
||||
allowedReferences = [ "out" ];
|
||||
};
|
||||
@@ -249,7 +245,7 @@ rec {
|
||||
# an SSL-capable curl
|
||||
curl --version | grep SSL
|
||||
|
||||
${build}/in-nixpkgs/sh -c 'echo Hello World'
|
||||
${build}/on-server/sh -c 'echo Hello World'
|
||||
|
||||
export flags="-idirafter ${unpack}/include-Libsystem --sysroot=${unpack} -L${unpack}/lib"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user