2008-01-29 05:24:40 -08:00
|
|
|
{stdenv, fetchurl, kernel}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-07-16 04:02:37 -07:00
|
|
|
name = "aufs-snap-2.6.30-${kernel.version}";
|
2008-05-21 02:19:44 -07:00
|
|
|
|
2008-01-29 05:24:40 -08:00
|
|
|
src = fetchurl {
|
2009-07-16 04:02:37 -07:00
|
|
|
url = "mirror://debian/pool/main/l/linux-modules-extra-2.6/linux-modules-extra-2.6_2.6.30-1.tar.gz";
|
|
|
|
sha256 = "19llmha4ynvnk5jgvf9iabl1kk7qhliyq7s3y2a9dna3kbkpw2vw";
|
2008-01-29 05:24:40 -08:00
|
|
|
};
|
|
|
|
|
2008-05-21 02:19:44 -07:00
|
|
|
buildPhase = ''
|
2008-01-29 05:24:40 -08:00
|
|
|
kernelVersion=$(cd ${kernel}/lib/modules && ls)
|
2008-02-08 15:13:18 -08:00
|
|
|
kernelBuild=$(echo ${kernel}/lib/modules/$kernelVersion/source)
|
|
|
|
tar xvfj ${kernel.src}
|
|
|
|
kernelSource=$(echo $(pwd)/linux-*)
|
|
|
|
cp -prd $kernelBuild/* $kernelSource
|
2009-05-03 03:46:59 -07:00
|
|
|
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$PWD/include"
|
2008-02-08 15:13:18 -08:00
|
|
|
|
|
|
|
make KDIR=$kernelSource -f local.mk
|
2008-01-29 05:24:40 -08:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out/bin
|
|
|
|
cp util/aulchown $out/bin
|
|
|
|
|
|
|
|
ensureDir $out/share/man/man5
|
|
|
|
cp util/aufs.5 $out/share/man/man5
|
|
|
|
|
|
|
|
ensureDir $out/lib/modules/$kernelVersion/misc
|
|
|
|
cp aufs.ko $out/lib/modules/$kernelVersion/misc
|
|
|
|
'';
|
|
|
|
|
2009-05-03 03:46:59 -07:00
|
|
|
patches = [
|
|
|
|
];
|
|
|
|
|
2008-01-29 05:24:40 -08:00
|
|
|
meta = {
|
|
|
|
description = "Another Unionfs implementation for Linux";
|
|
|
|
homepage = http://aufs.sourceforge.net/;
|
|
|
|
};
|
|
|
|
}
|