nixpkgs-suyu/pkgs/os-specific/linux/aufs/3.nix
Shea Levy 4fa4ab3a6e Partially revert my recent kernelPackages changes
First, pass in `self' again so that overriding works properly (thanks
for pointing that out, @edolstra)

Second, instead of having linuxPackages*.kernel mean something different
inside the set and out, add a new attribute linuxPackages*.kernelDev,
which for the generic kernel is simply linuxPackages*.kernel but for the
manual-config kernel is the `dev' output (which has the build tree,
source tree, etc.)

The second change required trivial modifications in a bunch of
expressions, I verified that all of the linuxPackages* sets defined in
all-packages.nix have the same drv paths before and after the change.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-24 07:45:00 -04:00

44 lines
1.2 KiB
Nix

{ stdenv, kernelDev, 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 kernelDev.kernelPatches;
in
stdenv.mkDerivation {
name = "aufs3-${patch.version}-${kernelDev.version}";
src = patch.patch.src;
buildInputs = [ perl ];
makeFlags = "KDIR=${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build";
NIX_CFLAGS_COMPILE="-I${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build/include/generated";
installPhase =
''
mkdir -p $out/lib/modules/${kernelDev.modDirVersion}/misc
cp -v aufs.ko $out/lib/modules/${kernelDev.modDirVersion}/misc
# Install the headers because aufs3-util requires them.
mkdir -p $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 ];
platforms = stdenv.lib.platforms.linux;
};
}