2010-08-29 15:39:35 +01:00
|
|
|
{ stdenv, fetchurl, kernel, perl, fetchgit }:
|
2009-09-08 10:35:21 +01:00
|
|
|
|
2010-05-28 10:29:39 +01:00
|
|
|
assert kernel.features ? aufsBase;
|
|
|
|
|
2010-05-28 08:09:15 +01:00
|
|
|
let version = "20100522"; in
|
2009-09-08 10:35:21 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-05-28 08:09:15 +01:00
|
|
|
name = "aufs2-${version}";
|
2009-09-08 10:35:21 +01:00
|
|
|
|
2010-08-29 19:31:51 +01:00
|
|
|
src =
|
|
|
|
if (builtins.lessThan (builtins.compareVersions kernel.version "2.6.35") 0) then
|
|
|
|
fetchurl {
|
|
|
|
url = "http://nixos.org/tarballs/aufs2-standalone-git-${version}.tar.bz2";
|
|
|
|
sha256 = "1g4mw4qx2xzpygdwjiw36bkhfz1hi7wxx7w79n2h0lr5grzzdnd6";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchgit {
|
|
|
|
url = "http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git";
|
|
|
|
rev = "d950eef373ff1e0448ad3945b734da6ab050571d";
|
|
|
|
sha256 = "816145b0341bd7862df50c058144cf6ebc25c05d2976f781ff0fe10d4559b853";
|
|
|
|
};
|
2009-09-08 10:35:21 +01:00
|
|
|
|
2009-09-13 11:25:58 +01:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
2010-05-28 08:09:15 +01:00
|
|
|
makeFlags = "KDIR=${kernel}/lib/modules/${kernel.version}/build";
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
ensureDir $out/lib/modules/${kernel.version}/misc
|
|
|
|
cp aufs.ko $out/lib/modules/${kernel.version}/misc
|
|
|
|
|
|
|
|
# Install the headers because aufs2-util requires them.
|
|
|
|
cp -prvd include $out/
|
|
|
|
'';
|
2009-09-08 10:35:21 +01:00
|
|
|
|
|
|
|
meta = {
|
2010-05-28 08:09:15 +01:00
|
|
|
description = "Another Unionfs implementation for Linux (second generation)";
|
2009-09-08 10:35:21 +01:00
|
|
|
homepage = http://aufs.sourceforge.net/;
|
2010-08-29 19:31:51 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco
|
|
|
|
stdenv.lib.maintainers.raskin ];
|
2010-05-28 08:09:15 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-09-08 10:35:21 +01:00
|
|
|
};
|
|
|
|
}
|