2008-01-29 14:24:40 +01:00
|
|
|
{stdenv, fetchurl, kernel}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-07-16 13:39:03 +02:00
|
|
|
name = "aufs-20090414-${kernel.version}";
|
2008-05-21 11:19:44 +02:00
|
|
|
|
2009-07-16 13:39:03 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = http://nixos.org/tarballs/aufs-20090414.tar.bz2;
|
|
|
|
sha256 = "1jhf3kccx0m84frlgx2d0ysn1c4272dgci59dsk7vsfrf7yik526";
|
2008-01-29 14:24:40 +01:00
|
|
|
};
|
|
|
|
|
2008-05-21 11:19:44 +02:00
|
|
|
buildPhase = ''
|
2008-01-29 14:24:40 +01:00
|
|
|
kernelVersion=$(cd ${kernel}/lib/modules && ls)
|
2008-02-09 00:13:18 +01:00
|
|
|
kernelBuild=$(echo ${kernel}/lib/modules/$kernelVersion/source)
|
|
|
|
tar xvfj ${kernel.src}
|
|
|
|
kernelSource=$(echo $(pwd)/linux-*)
|
|
|
|
cp -prd $kernelBuild/* $kernelSource
|
2009-05-03 12:46:59 +02:00
|
|
|
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$PWD/include"
|
2008-02-09 00:13:18 +01:00
|
|
|
|
|
|
|
make KDIR=$kernelSource -f local.mk
|
2008-01-29 14:24:40 +01: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 12:46:59 +02:00
|
|
|
patches = [
|
2009-07-16 13:39:03 +02:00
|
|
|
# Debian patch to build AUFS on 2.6.29+
|
|
|
|
./debian-2.6.29.diff
|
2009-05-03 12:46:59 +02:00
|
|
|
];
|
|
|
|
|
2008-01-29 14:24:40 +01:00
|
|
|
meta = {
|
|
|
|
description = "Another Unionfs implementation for Linux";
|
|
|
|
homepage = http://aufs.sourceforge.net/;
|
|
|
|
};
|
|
|
|
}
|