nixpkgs/pkgs/os-specific/linux/aufs2-utils/default.nix
Michael Raskin 9ff982e4ab Require AUFS2 support in kernel
svn path=/nixpkgs/trunk/; revision=17150
2009-09-15 08:55:41 +00:00

39 lines
1,004 B
Nix

a :
if (a.lib.attrByPath ["features" "zen"] false a.kernel) ||
(a.lib.attrByPath ["features" "aufs"] false a.kernel) then
let
s = import ./src-for-default.nix;
buildInputs = with a; [
];
in
rec {
src = (a.fetchGitFromSrcInfo s) + "/";
inherit (s) name;
inherit buildInputs;
configureFlags = [];
preBuild = a.fullDepEntry (''
sed -e "s@/usr@@g; s@-o root@@g; s@-g root@@g" -i Makefile
'') ["doUnpack" "minInit"];
postInstall = a.fullDepEntry (''
sed -e "s@/etc/default@$out&@; s@/sbin/mount@$out&@" -i "$out/bin/"*
'') ["minInit"];
/* doConfigure should be removed if not needed */
phaseNames = ["preBuild" "doMakeInstall" "postInstall"];
makeFlags = [
''KDIR="${a.kernel}/lib/modules/${a.kernel.version}/build"''
''DESTDIR="$out"''
];
meta = {
description = "AUFS2 utilities";
maintainers = [
a.lib.maintainers.raskin
];
platforms = with a.lib.platforms;
linux;
};
}
else throw "Kernel doesn't support AUFS"