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