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:
parent
5f683794c2
commit
4624c8bc3f
20
pkgs/os-specific/linux/klibc/shrunk.nix
Normal file
20
pkgs/os-specific/linux/klibc/shrunk.nix
Normal 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"];
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue