2013-03-24 11:45:00 +00:00
|
|
|
{ stdenv, fetchurl, kernelDev, perl, fetchgit }:
|
2009-09-08 10:35:21 +01:00
|
|
|
|
2013-03-24 11:45:00 +00:00
|
|
|
assert kernelDev.features ? aufsBase;
|
2010-05-28 10:29:39 +01:00
|
|
|
|
2010-05-28 08:09:15 +01:00
|
|
|
let version = "20100522"; in
|
2009-09-08 10:35:21 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-03-24 11:45:00 +00:00
|
|
|
name = "aufs2-${version}-${kernelDev.version}";
|
2009-09-08 10:35:21 +01:00
|
|
|
|
2010-08-29 19:31:51 +01:00
|
|
|
src =
|
2013-03-24 11:45:00 +00:00
|
|
|
if (builtins.lessThan (builtins.compareVersions kernelDev.version "2.6.35") 0) then
|
2010-08-29 19:31:51 +01:00
|
|
|
fetchurl {
|
2013-06-25 13:05:48 +01:00
|
|
|
url = "http://tarballs.nixos.org/aufs2-standalone-git-${version}.tar.bz2";
|
2010-08-29 19:31:51 +01:00
|
|
|
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 ];
|
|
|
|
|
2013-03-24 11:45:00 +00:00
|
|
|
makeFlags = "KDIR=${kernelDev}/lib/modules/${kernelDev.version}/build";
|
2010-05-28 08:09:15 +01:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
2013-03-24 11:45:00 +00:00
|
|
|
mkdir -p $out/lib/modules/${kernelDev.version}/misc
|
|
|
|
cp aufs.ko $out/lib/modules/${kernelDev.version}/misc
|
2010-05-28 08:09:15 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
};
|
|
|
|
}
|