mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
0aea0db581
modules) together in an attribute set returned by the function "kernelPackagesFor" that takes a kernel as argument. For instance, kernelPackages_2_6_23 is the result of calling this function with kernel_2_6_23. This is necessary in NixOS to make it easier to override the kernel: it's not enough to just specify a different kernel (via the boot.kernel option), but you also need matching nvidiaDriver, aufs, iwlwifi, etc. Having a single attribute set that contains all kernel-related packages makes this much easier. * The kernel now has a passthru attribute "features" that allows NixOS expressions to test whether a kernel has certain features. For instance, the externel "iwlwifi" kernel module package should only be built on kernels < 2.6.24, as kernels >= 2.6.24 have iwlwifi support integrated. So the NixOS expressions can do the test "kernel.features ? iwlwifi" to see if the iwlwifi package should be built. Kernel patches can declare additional features. E.g., the fbsplash patch adds a "fbSplash" feature. svn path=/nixpkgs/trunk/; revision=11881
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{stdenv, fetchurl, kernel}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "aufs-20080508-${kernel.version}";
|
|
|
|
src = fetchurl {
|
|
url = http://nixos.org/tarballs/aufs-20080508.tar.bz2;
|
|
sha256 = "1b7y6klk2fc6hf8w2la4k3yvxdvjibsnhv7d6mb12a7h13msjci6";
|
|
};
|
|
|
|
patches = [
|
|
(fetchurl {
|
|
url = http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg01091/04_sec_perm.dpatch;
|
|
sha256 = "0b51dpks4d5qgysrakv2c1v076d9hc8ln2cbh012zi75b45gn4ir";
|
|
})
|
|
];
|
|
|
|
buildPhase = ''
|
|
kernelVersion=$(cd ${kernel}/lib/modules && ls)
|
|
kernelBuild=$(echo ${kernel}/lib/modules/$kernelVersion/source)
|
|
tar xvfj ${kernel.src}
|
|
kernelSource=$(echo $(pwd)/linux-*)
|
|
cp -prd $kernelBuild/* $kernelSource
|
|
|
|
make KDIR=$kernelSource -f local.mk
|
|
'';
|
|
|
|
installPhase = ''
|
|
ensureDir $out/bin
|
|
cp util/aulchown $out/bin
|
|
|
|
ensureDir $out/share/man/man5
|
|
cp util/aufs.5 $out/share/man/man5
|
|
|
|
ensureDir $out/lib/modules/$kernelVersion/misc
|
|
cp aufs.ko $out/lib/modules/$kernelVersion/misc
|
|
'';
|
|
|
|
meta = {
|
|
description = "Another Unionfs implementation for Linux";
|
|
homepage = http://aufs.sourceforge.net/;
|
|
};
|
|
}
|