mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
* Use bzip instead of gzip for downloaded archives.
* Combine most of the archives together into one file (static.bz2). * Don't depend on Subversion directories, but single files only. Otherwise any Subversion operation may cause a rebuild because something in .svn changes. It would be nice if .svn directories were filtered out when copying things to the store. * Glibc tarball: removed all .so files, /bin and /sbin, etc., and put linux-headers in the Glibc tarball. svn path=/nixpkgs/trunk/; revision=2265
This commit is contained in:
parent
63bd7cdb79
commit
31ff064352
BIN
pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.bz2
Normal file
BIN
pkgs/stdenv/linux/curl-static/curl-7.12.2-static.tar.bz2
Normal file
Binary file not shown.
Binary file not shown.
@ -17,11 +17,11 @@ rec {
|
|||||||
# binary which is unpacked here.
|
# binary which is unpacked here.
|
||||||
curl = derivation {
|
curl = derivation {
|
||||||
name = "curl";
|
name = "curl";
|
||||||
builder = ./bash-static/bash;
|
builder = ./tools/bash;
|
||||||
tar = ./gnutar-static/bin/tar;
|
tar = ./tools/tar;
|
||||||
gunzip = ./gzip-static/bin/gunzip;
|
bunzip2 = ./tools/bunzip2;
|
||||||
curl = ./curl-static/curl-7.12.2-static.tar.gz;
|
|
||||||
cp = ./tools/cp;
|
cp = ./tools/cp;
|
||||||
|
curl = ./curl-static/curl-7.12.2-static.tar.bz2;
|
||||||
system = "i686-linux";
|
system = "i686-linux";
|
||||||
args = [ ./scripts/curl-unpack ];
|
args = [ ./scripts/curl-unpack ];
|
||||||
};
|
};
|
||||||
@ -33,11 +33,11 @@ rec {
|
|||||||
, extra3 ? null, extra4? null, patchelf ? null}:
|
, extra3 ? null, extra4? null, patchelf ? null}:
|
||||||
derivation {
|
derivation {
|
||||||
name = pkgname;
|
name = pkgname;
|
||||||
builder = ./bash-static/bash;
|
builder = ./tools/bash;
|
||||||
tar = ./gnutar-static/bin/tar;
|
tar = ./tools/tar;
|
||||||
gunzip = ./gzip-static/bin/gunzip;
|
bunzip2 = ./tools/bunzip2;
|
||||||
inherit curl url;
|
|
||||||
cp = ./tools/cp;
|
cp = ./tools/cp;
|
||||||
|
inherit curl url;
|
||||||
system = "i686-linux";
|
system = "i686-linux";
|
||||||
args = [ ./scripts/download-script ];
|
args = [ ./scripts/download-script ];
|
||||||
inherit postProcess addToPath extra extra2 extra3 extra4 patchelf;
|
inherit postProcess addToPath extra extra2 extra3 extra4 patchelf;
|
||||||
@ -45,97 +45,48 @@ rec {
|
|||||||
|
|
||||||
# The various statically linked components that make up the standard
|
# The various statically linked components that make up the standard
|
||||||
# environment.
|
# environment.
|
||||||
coreutils = download {
|
staticTools = download {
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/coreutils-5.0-static.tar.gz;
|
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/////static.tar.bz2;
|
||||||
pkgname = "coreutils";
|
pkgname = "static-tools";
|
||||||
};
|
|
||||||
|
|
||||||
patchelf = ./patchelf-static/bin/patchelf;
|
|
||||||
|
|
||||||
bzip2 = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/bzip2-1.0.2-static.tar.gz;
|
|
||||||
pkgname = "bzip2";
|
|
||||||
};
|
|
||||||
|
|
||||||
gnumake = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/make-3.80-static.tar.gz;
|
|
||||||
pkgname = "gnumake";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
binutils = download {
|
binutils = download {
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/binutils-2.15-static.tar.gz;
|
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/binutils-2.15-static.tar.bz2;
|
||||||
pkgname = "binutils";
|
pkgname = "binutils";
|
||||||
};
|
};
|
||||||
|
|
||||||
diffutils = download {
|
gcc = (download {url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/gcc-3.4.2-static.tar.bz2;
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/diffutils-2.8.1-static.tar.gz;
|
|
||||||
pkgname = "diffutils";
|
|
||||||
};
|
|
||||||
|
|
||||||
gnused = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/sed-4.0.7-static.tar.gz;
|
|
||||||
pkgname = "gnused";
|
|
||||||
};
|
|
||||||
|
|
||||||
gnugrep = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/grep-2.5.1-static.tar.gz;
|
|
||||||
pkgname = "gnugrep";
|
|
||||||
};
|
|
||||||
|
|
||||||
gcc = (download {url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/gcc-3.4.2-static.tar.gz;
|
|
||||||
pkgname = "gcc";
|
pkgname = "gcc";
|
||||||
postProcess = [./scripts/fix-outpath.sh];
|
postProcess = [./scripts/fix-outpath.sh];
|
||||||
addToPath = [coreutils findutils gnused];
|
addToPath = [staticTools];
|
||||||
}) // { langC = true; langCC = false; langF77 = false; };
|
}) // { langC = true; langCC = false; langF77 = false; };
|
||||||
|
|
||||||
gawk = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/gawk-3.1.3-static.tar.gz;
|
|
||||||
pkgname = "gawk";
|
|
||||||
};
|
|
||||||
|
|
||||||
patch = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/patch-2.5.4-static.tar.gz;
|
|
||||||
pkgname = "patch";
|
|
||||||
};
|
|
||||||
|
|
||||||
findutils = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/findutils-4.1.20-static.tar.gz;
|
|
||||||
pkgname = "findutils";
|
|
||||||
};
|
|
||||||
|
|
||||||
linuxHeaders = download {
|
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/linux-headers-2.4.25-i386.tar.gz;
|
|
||||||
pkgname = "linux-headers";
|
|
||||||
};
|
|
||||||
|
|
||||||
glibc = download {
|
glibc = download {
|
||||||
url = http://losser.st-lab.cs.uu.nl/~armijn/.nix/glibc-2.3.3-static-2.tar.gz;
|
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/stdenv-linux/glibc-2.3.3-static.tar.bz2;
|
||||||
pkgname = "glibc";
|
pkgname = "glibc";
|
||||||
patchelf = ./patchelf-static/bin/patchelf;
|
postProcess = [./scripts/fix-outpath.sh];
|
||||||
postProcess = [./scripts/add-symlink.sh ./scripts/fix-outpath.sh];
|
addToPath = [staticTools];
|
||||||
addToPath = [coreutils findutils gnused];
|
|
||||||
extra = linuxHeaders;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# The "fake" standard environment used to build "real" standard
|
# The "fake" standard environment used to build "real" standard
|
||||||
# environments. It consists of just bash, coreutils, and sed, which
|
# environments. It consists of just the basic statically linked
|
||||||
# is all that is needed by ../generic/builder.sh.
|
# tools.
|
||||||
stdenvInitial = let {
|
stdenvInitial = let {
|
||||||
body = derivation {
|
body = derivation {
|
||||||
name = "stdenv-linux-static-initial";
|
name = "stdenv-linux-initial";
|
||||||
system = "i686-linux";
|
system = "i686-linux";
|
||||||
builder = ./bash-static/bash;
|
builder = ./tools/bash;
|
||||||
args = ./scripts/builder-stdenv-initial.sh;
|
args = ./scripts/builder-stdenv-initial.sh;
|
||||||
inherit coreutils gnused;
|
inherit staticTools;
|
||||||
} // {
|
} // {
|
||||||
mkDerivation = attrs: derivation (attrs // {
|
mkDerivation = attrs: derivation (attrs // {
|
||||||
builder = ./bash-static/bash;
|
builder = ./tools/bash;
|
||||||
args = ["-e" attrs.builder];
|
args = ["-e" attrs.builder];
|
||||||
stdenv = body;
|
stdenv = body;
|
||||||
system = body.system;
|
system = body.system;
|
||||||
});
|
});
|
||||||
shell = ./bash-static/bash;
|
shell = ./tools/bash;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -143,11 +94,11 @@ rec {
|
|||||||
# This function builds the various standard environments used during
|
# This function builds the various standard environments used during
|
||||||
# the bootstrap.
|
# the bootstrap.
|
||||||
stdenvBootFun = {glibc, gcc, binutils, staticGlibc}: (import ../generic) {
|
stdenvBootFun = {glibc, gcc, binutils, staticGlibc}: (import ../generic) {
|
||||||
name = "stdenv-linux-static-boot";
|
name = "stdenv-linux-boot";
|
||||||
param1 = if staticGlibc then "static" else "dynamic";
|
param1 = if staticGlibc then "static" else "dynamic";
|
||||||
preHook = ./prehook.sh;
|
preHook = ./prehook.sh;
|
||||||
stdenv = stdenvInitial;
|
stdenv = stdenvInitial;
|
||||||
shell = ./bash-static/bash;
|
shell = ./tools/bash;
|
||||||
gcc = (import ../../build-support/gcc-wrapper) {
|
gcc = (import ../../build-support/gcc-wrapper) {
|
||||||
stdenv = stdenvInitial;
|
stdenv = stdenvInitial;
|
||||||
nativeTools = false;
|
nativeTools = false;
|
||||||
@ -155,18 +106,7 @@ rec {
|
|||||||
inherit gcc glibc binutils;
|
inherit gcc glibc binutils;
|
||||||
};
|
};
|
||||||
initialPath = [
|
initialPath = [
|
||||||
coreutils
|
staticTools
|
||||||
./gnutar-static
|
|
||||||
./gzip-static
|
|
||||||
bzip2
|
|
||||||
gnused
|
|
||||||
gnugrep
|
|
||||||
gawk
|
|
||||||
gnumake
|
|
||||||
findutils
|
|
||||||
diffutils
|
|
||||||
patch
|
|
||||||
./patchelf-static
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -225,7 +165,7 @@ rec {
|
|||||||
# Binutils built above, and adds in dynamically linked versions
|
# Binutils built above, and adds in dynamically linked versions
|
||||||
# of all other tools.
|
# of all other tools.
|
||||||
stdenvLinux = (import ../generic) {
|
stdenvLinux = (import ../generic) {
|
||||||
name = "stdenv-nix-linux";
|
name = "stdenv-linux";
|
||||||
preHook = ./prehook.sh;
|
preHook = ./prehook.sh;
|
||||||
initialPath = [
|
initialPath = [
|
||||||
((import ../nix/path.nix) {pkgs = stdenvLinuxBoot3Pkgs;})
|
((import ../nix/path.nix) {pkgs = stdenvLinuxBoot3Pkgs;})
|
||||||
|
Binary file not shown.
@ -1,13 +0,0 @@
|
|||||||
chmod u+w $out/include
|
|
||||||
(cd $out/include && ln -s $extra/include/* .) || exit 1
|
|
||||||
|
|
||||||
cd $out
|
|
||||||
find . -not -type l -exec $extra2/bin/chmod u+w {} \;
|
|
||||||
find . -exec $patchelf --interpreter $out/lib/ld-linux.so.2 --shrink-rpath {} \; || true
|
|
||||||
|
|
||||||
$extra2/bin/rm -rf bin
|
|
||||||
|
|
||||||
$extra2/bin/cat ./lib/libc.so | $extra4/bin/sed "s|/nix/store/[a-z0-9]*-glibc|$out|g" > ./lib/libc.so
|
|
||||||
$extra2/bin/cat ./lib/libpthread.so | $extra4/bin/sed "s|/nix/store/[a-z0-9]*-glibc|$out|g" > ./lib/libpthread.so
|
|
||||||
|
|
||||||
rm $out/lib/*.so*
|
|
@ -6,5 +6,5 @@ PATH=$coreutils/bin
|
|||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
cat > $out/setup <<EOF
|
cat > $out/setup <<EOF
|
||||||
PATH=$coreutils/bin:$gnused/bin
|
PATH=$staticTools/bin
|
||||||
EOF
|
EOF
|
||||||
|
@ -3,6 +3,6 @@ set -e
|
|||||||
|
|
||||||
echo $curl
|
echo $curl
|
||||||
|
|
||||||
$gunzip -d < $curl | $tar xvf -
|
$bunzip2 -d < $curl | $tar xvf -
|
||||||
|
|
||||||
$cp -prvd * $out
|
$cp -prvd * $out
|
||||||
|
@ -4,7 +4,7 @@ echo "using curl executable $curl"
|
|||||||
|
|
||||||
$curl/bin/curl "$url" > .tmp
|
$curl/bin/curl "$url" > .tmp
|
||||||
|
|
||||||
$gunzip -d < .tmp | $tar xvf -
|
$bunzip2 -d < .tmp | $tar xvf -
|
||||||
|
|
||||||
$cp -prd * $out
|
$cp -prd * $out
|
||||||
|
|
||||||
|
BIN
pkgs/stdenv/linux/tools/bunzip2
Executable file
BIN
pkgs/stdenv/linux/tools/bunzip2
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user