2008-08-09 09:40:37 +01:00
|
|
|
{stdenv, fetchurl, perl, bison, mktemp, kernel
|
|
|
|
, version ? "1.5"
|
|
|
|
, sha256 ? "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017"
|
|
|
|
, subdir ? ""
|
2008-11-02 15:53:55 +00:00
|
|
|
, addPreBuild ? ""
|
2008-08-09 09:40:37 +01:00
|
|
|
}:
|
2005-08-27 21:48:05 +01:00
|
|
|
|
2006-11-25 00:28:15 +00:00
|
|
|
assert stdenv.isLinux;
|
2005-08-27 21:48:05 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-08-09 09:40:37 +01:00
|
|
|
name = "klibc-${version}";
|
2008-11-02 15:53:55 +00: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 21:48:05 +01:00
|
|
|
src = fetchurl {
|
2008-08-09 09:40:37 +01:00
|
|
|
url = "mirror://kernel/linux/libs/klibc/${subdir}klibc-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
2008-08-08 20:05:32 +01:00
|
|
|
# url = mirror://kernel/linux/libs/klibc/Testing/klibc-1.5.14.tar.bz2;
|
|
|
|
# sha256 = "1cmrqpgamnv2ns7dlxjm61zc88dxm4ff0aya413ij1lmhp2h2sfc";
|
2005-08-27 21:48:05 +01:00
|
|
|
};
|
2006-11-26 23:24:40 +00:00
|
|
|
inherit kernel;
|
2006-11-25 21:49:42 +00:00
|
|
|
buildInputs = [perl bison mktemp];
|
2008-08-08 20:05:32 +01:00
|
|
|
#patches = [./install.patch];
|
2005-08-27 21:48:05 +01:00
|
|
|
}
|