* klibc: install statically linked binaries as well.
* klibc: build against the regular kernel headers instead of depending on a kernel build. This way we don't have to rebuild klibc every time the kernel changes. * splashutils 1.3: compile properly with a klibc that uses unpatched kernel headers. svn path=/nixpkgs/trunk/; revision=13900
This commit is contained in:
@@ -1,30 +1,34 @@
|
||||
{stdenv, fetchurl, perl, bison, mktemp, kernel
|
||||
, version ? "1.5"
|
||||
, sha256 ? "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017"
|
||||
, subdir ? ""
|
||||
, addPreBuild ? ""
|
||||
}:
|
||||
{stdenv, fetchurl, perl, bison, mktemp, kernelHeaders}:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
let version = "1.5"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "klibc-${version}";
|
||||
#builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/libs/klibc/klibc-${version}.tar.bz2";
|
||||
sha256 = "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017";
|
||||
};
|
||||
|
||||
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/
|
||||
mkdir linux
|
||||
cp -prsd ${kernelHeaders}/include linux/
|
||||
chmod -R u+w linux/include/
|
||||
'' + addPreBuild;
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/libs/klibc/${subdir}klibc-${version}.tar.bz2";
|
||||
inherit sha256;
|
||||
# url = mirror://kernel/linux/libs/klibc/Testing/klibc-1.5.14.tar.bz2;
|
||||
# sha256 = "1cmrqpgamnv2ns7dlxjm61zc88dxm4ff0aya413ij1lmhp2h2sfc";
|
||||
};
|
||||
inherit kernel;
|
||||
''; # */
|
||||
|
||||
# Install static binaries as well.
|
||||
postInstall = ''
|
||||
dir=$out/lib/klibc/bin.static
|
||||
mkdir $dir
|
||||
cp $(find $(find . -name static) -type f ! -name "*.g" -a ! -name ".*") $dir/
|
||||
cp usr/dash/sh $dir/
|
||||
'';
|
||||
|
||||
buildInputs = [perl bison mktemp];
|
||||
#patches = [./install.patch];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user