3
0
Fork 0
forked from mirrors/nixpkgs

aufs3 kernelPackage

svn path=/nixpkgs/trunk/; revision=29534
This commit is contained in:
Shea Levy 2011-09-28 21:46:07 +00:00
parent 2e012018bb
commit 4add420a48
4 changed files with 56 additions and 10 deletions

View file

@ -0,0 +1,41 @@
{ stdenv, kernel, perl }:
let
aufsPredicate = x:
if x ? features then
(if x.features ? aufs3 then x.features.aufs3 else false)
else false;
featureAbort = abort "This kernel does not have aufs 3 support";
patch = stdenv.lib.findFirst aufsPredicate featureAbort kernel.kernelPatches;
in
stdenv.mkDerivation {
name = "aufs3-${patch.version}";
src = patch.patch.src;
buildInputs = [ perl ];
makeFlags = "KDIR=${kernel}/lib/modules/${kernel.modDirVersion}/build";
installPhase =
''
ensureDir $out/lib/modules/${kernel.modDirVersion}/misc
cp -v aufs.ko $out/lib/modules/${kernel.modDirVersion}/misc
# Install the headers because aufs3-util requires them.
ensureDir $out/include/linux
cp -v usr/include/linux/aufs_type.h $out/include/linux
'';
meta = {
description = "Another Unionfs implementation for Linux (third generation)";
homepage = http://aufs.sourceforge.net/;
maintainers = [ stdenv.lib.maintainers.eelco
stdenv.lib.maintainers.raskin
stdenv.lib.maintainers.shlevy ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -69,7 +69,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
passthru = {
inherit version modDirVersion;
inherit version modDirVersion kernelPatches;
# Combine the `features' attribute sets of all the kernel patches.
features = lib.fold (x: y: (if x ? features then x.features else {}) // y) features kernelPatches;
};

View file

@ -290,16 +290,17 @@ rec {
features.aufs2_1 = true;
};
aufs3_0 =
{ name = "aufs3.0";
patch = makeAufs3StandalonePatch {
version = "3.0";
rev = "1067b9d8d64d23c70d905c9cd3c90a669e39c4d4";
sha256 = "b508cab5987a623f057ae5fdc006c909a6bae6151af6e12fe672bf97b1a7549d";
};
features.aufsBase = true;
features.aufs3 = true;
aufs3_0 = rec {
name = "aufs3.0";
version = "3.0";
patch = makeAufs3StandalonePatch {
inherit version;
rev = "1067b9d8d64d23c70d905c9cd3c90a669e39c4d4";
sha256 = "b508cab5987a623f057ae5fdc006c909a6bae6151af6e12fe672bf97b1a7549d";
};
features.aufsBase = true;
features.aufs3 = true;
};
# Increase the timeout on CIFS requests from 15 to 120 seconds to
# make CIFS more resilient to high load on the CIFS server.

View file

@ -5588,6 +5588,10 @@ let
callPackage ../os-specific/linux/aufs2.1 { }
else null;
aufs3 = if kernel.features ? aufs3 then
callPackage ../os-specific/linux/aufs3 { }
else null;
aufs2_1_util = if kernel.features ? aufs2_1 then
callPackage ../os-specific/linux/aufs2.1-util { }
else null;