Author: shlevy
Date: Wed Sep 28 21:46:07 2011
New Revision: 29534
URL: https://ssl.nixos.org/websvn/nix/?rev=29534&sc=1
Log:
aufs3 kernelPackage
Added:
nixpkgs/trunk/pkgs/os-specific/linux/aufs3/
- copied from r29530, nixpkgs/trunk/pkgs/os-specific/linux/aufs2.1/
Modified:
nixpkgs/trunk/pkgs/os-specific/linux/aufs3/default.nix
nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix
nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
nixpkgs/trunk/pkgs/top-level/all-packages.nix
Modified: nixpkgs/trunk/pkgs/os-specific/linux/aufs3/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/aufs2.1/default.nix Wed Sep 28
16:48:17 2011 (r29530)
+++ nixpkgs/trunk/pkgs/os-specific/linux/aufs3/default.nix Wed Sep 28
21:46:07 2011 (r29534)
@@ -1,45 +1,37 @@
-{ stdenv, kernel, fetchgit, perl }:
+{ stdenv, kernel, perl }:
-assert kernel.features ? aufsBase;
+let
-let version =
- if (builtins.lessThan (builtins.compareVersions kernel.version "2.6.38") 0)
- then "20110303"
- else "20110408"; in
+ 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 = "aufs2.1-${version}";
+ name = "aufs3-${patch.version}";
- src =
- if (builtins.lessThan (builtins.compareVersions kernel.version "2.6.38") 0)
- then
- fetchgit {
- url = "git://git.c3sl.ufpr.br/aufs/aufs2-standalone.git";
- rev = "aceef6c84dbe5798bf46904252727b9588eafaf6";
- sha256 =
"50a8cb39af5fee82e88b65351cac52b6ab95a68c45e0a98da9fa1925b28f048d";
- }
- else
- fetchgit {
- url = "git://git.c3sl.ufpr.br/aufs/aufs2-standalone.git";
- rev = "01cb6101f477339bc95e6b47e3618bb29ecc68db";
- sha256 =
"4af3c4b1e99ef58abe8530665309021d541ee840ee54f442606cc418646a1faf";
- };
+ src = patch.patch.src;
buildInputs = [ perl ];
- makeFlags = "KDIR=${kernel}/lib/modules/${kernel.version}/build";
+ makeFlags = "KDIR=${kernel}/lib/modules/${kernel.modDirVersion}/build";
installPhase =
''
- ensureDir $out/lib/modules/${kernel.version}/misc
- cp -v aufs.ko $out/lib/modules/${kernel.version}/misc
+ ensureDir $out/lib/modules/${kernel.modDirVersion}/misc
+ cp -v aufs.ko $out/lib/modules/${kernel.modDirVersion}/misc
- # Install the headers because aufs2.1-util requires them.
- cp -av usr/include $out/
+ # 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 (second
generation)";
+ description = "Another Unionfs implementation for Linux (third
generation)";
homepage = http://aufs.sourceforge.net/;
maintainers = [ stdenv.lib.maintainers.eelco
stdenv.lib.maintainers.raskin
Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix Wed Sep 28
21:09:54 2011 (r29533)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix Wed Sep 28
21:46:07 2011 (r29534)
@@ -69,7 +69,7 @@
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;
};
Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix Wed Sep 28
21:09:54 2011 (r29533)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/patches.nix Wed Sep 28
21:46:07 2011 (r29534)
@@ -290,16 +290,17 @@
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.
Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix Wed Sep 28 21:09:54
2011 (r29533)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Wed Sep 28 21:46:07
2011 (r29534)
@@ -5588,6 +5588,10 @@
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;
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits