diff options
Diffstat (limited to 'pkgs/os-specific/linux/aufs/3.nix')
-rw-r--r-- | pkgs/os-specific/linux/aufs/3.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/aufs/3.nix b/pkgs/os-specific/linux/aufs/3.nix new file mode 100644 index 000000000000..ec3c5aec85ba --- /dev/null +++ b/pkgs/os-specific/linux/aufs/3.nix @@ -0,0 +1,42 @@ +{ 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}-${kernel.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 + ''; + + passthru = { inherit patch; }; + 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; + }; +} |