2010-08-29 16:39:35 +02:00
|
|
|
{ stdenv, fetchurl, kernel, perl, fetchgit }:
|
2009-09-08 11:35:21 +02:00
|
|
|
|
2010-05-28 11:29:39 +02:00
|
|
|
assert kernel.features ? aufsBase;
|
|
|
|
|
2010-05-28 09:09:15 +02:00
|
|
|
let version = "20100522"; in
|
2009-09-08 11:35:21 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2011-11-08 16:05:54 +01:00
|
|
|
name = "aufs2-${version}-${kernel.version}";
|
2009-09-08 11:35:21 +02:00
|
|
|
|
2010-08-29 20:31:51 +02: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 11:35:21 +02:00
|
|
|
|
2009-09-13 12:25:58 +02:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
2010-05-28 09:09:15 +02:00
|
|
|
makeFlags = "KDIR=${kernel}/lib/modules/${kernel.version}/build";
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/lib/modules/${kernel.version}/misc
|
2010-05-28 09:09:15 +02:00
|
|
|
cp aufs.ko $out/lib/modules/${kernel.version}/misc
|
|
|
|
|
|
|
|
# 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
|
|
|
};
|
|
|
|
}
|