2008-08-09 10:40:37 +02:00
|
|
|
{stdenv, fetchurl, perl, bison, mktemp, kernel
|
|
|
|
, version ? "1.5"
|
|
|
|
, sha256 ? "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017"
|
|
|
|
, subdir ? ""
|
2008-11-02 16:53:55 +01:00
|
|
|
, addPreBuild ? ""
|
2008-08-09 10:40:37 +02:00
|
|
|
}:
|
2005-08-27 22:48:05 +02:00
|
|
|
|
2006-11-25 01:28:15 +01:00
|
|
|
assert stdenv.isLinux;
|
2005-08-27 22:48:05 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-08-09 10:40:37 +02:00
|
|
|
name = "klibc-${version}";
|
2008-11-02 16:53:55 +01:00
|
|
|
#builder = ./builder.sh;
|
|
|
|
makeFlags = ["V=1" "prefix=$out" "SHLIBDIR=$out/lib"];
|
|
|
|
preBuild = ''
|
|
|
|
makeFlags=$(eval "echo $makeFlags")
|
|
|
|
|
|
|
|
mkdir -p linux/include
|
|
|
|
cp -prd $kernel/lib/modules/*/build/include/* linux/include/
|
|
|
|
chmod -R u+w linux/include/
|
|
|
|
'' + addPreBuild;
|
2005-08-27 22:48:05 +02:00
|
|
|
src = fetchurl {
|
2008-08-09 10:40:37 +02:00
|
|
|
url = "mirror://kernel/linux/libs/klibc/${subdir}klibc-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
2008-08-08 21:05:32 +02:00
|
|
|
# url = mirror://kernel/linux/libs/klibc/Testing/klibc-1.5.14.tar.bz2;
|
|
|
|
# sha256 = "1cmrqpgamnv2ns7dlxjm61zc88dxm4ff0aya413ij1lmhp2h2sfc";
|
2005-08-27 22:48:05 +02:00
|
|
|
};
|
2006-11-27 00:24:40 +01:00
|
|
|
inherit kernel;
|
2006-11-25 22:49:42 +01:00
|
|
|
buildInputs = [perl bison mktemp];
|
2008-08-08 21:05:32 +02:00
|
|
|
#patches = [./install.patch];
|
2005-08-27 22:48:05 +02:00
|
|
|
}
|