3
0
Fork 0
forked from mirrors/nixpkgs

* klibShrunk: just the klibc binaries without header files etc; useful

for installation in initrds.

svn path=/nixpkgs/trunk/; revision=11125
This commit is contained in:
Eelco Dolstra 2008-03-14 13:46:47 +00:00
parent 5f683794c2
commit 4624c8bc3f
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,20 @@
{stdenv, klibc}:
stdenv.mkDerivation {
name = "${klibc.name}";
buildCommand = ''
ensureDir $out/lib
cp -prd ${klibc}/lib/klibc/bin $out/
cp -p ${klibc}/lib/*.so $out/lib/
chmod +w $out/*
old=$(echo ${klibc}/lib/klibc-*.so)
new=$(echo $out/lib/klibc-*.so)
for i in $out/bin/*; do
echo $i
sed "s^$old^$new^" -i $i
# !!! use patchelf
#patchelf --set-rpath /foo/bar $i
done
''; # */
allowedReferences = ["out"];
}

View file

@ -4165,7 +4165,11 @@ rec {
klibc = import ../os-specific/linux/klibc {
inherit fetchurl stdenv perl bison mktemp;
kernel = systemKernel;
kernel = systemKernel;
};
klibcShrunk = import ../os-specific/linux/klibc/shrunk.nix {
inherit stdenv klibc;
};
kvm = kvm57;