2008-01-29 05:24:40 -08:00
|
|
|
{stdenv, fetchurl, kernel}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-07-16 04:22:57 -07:00
|
|
|
name = "aufs-20090716-${kernel.version}";
|
2008-05-21 02:19:44 -07:00
|
|
|
|
2009-07-16 04:22:57 -07:00
|
|
|
src = fetchgit {
|
|
|
|
url = http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git;
|
|
|
|
md5 = "3945dd258f7c3baede49893b42073c42";
|
|
|
|
rev = "c5a75e75865debfc781b4cc2ddd2bf7aae3736e7";
|
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/;
|
|
|
|
};
|
|
|
|
}
|