diff --git a/pkgs/os-specific/linux/aufs3-util/default.nix b/pkgs/os-specific/linux/aufs3-util/default.nix new file mode 100644 index 000000000000..00c3e99c4577 --- /dev/null +++ b/pkgs/os-specific/linux/aufs3-util/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchgit, kernel, aufs3 }: + +stdenv.mkDerivation { + name = "aufs3-util-${aufs3.patch.version}"; + + src = fetchgit { + url = git://aufs.git.sourceforge.net/gitroot/aufs/aufs-util.git; + rev = aufs3.patch.utilRev; + sha256 = aufs3.patch.utilHash; + }; + + buildInputs = [ aufs3 ]; + + makeFlags = + [ "KDIR=${kernel}/lib/modules/${kernel.modDirVersion}/build" + "Install=install" + "DESTDIR=$(out)" + ]; + + postInstall = + '' + mv $out/usr/* $out + rmdir $out/usr + + cp aufs.shlib $out/lib/ + + substituteInPlace $out/bin/aubrsync \ + --replace /sbin/mount $out/sbin/mount \ + --replace /usr/lib/aufs.shlib $out/lib/aufs.shlib + ''; + + meta = { + description = "Utilities for AUFS3"; + homepage = http://aufs.sourceforge.net/; + maintainers = [ stdenv.lib.maintainers.eelco + stdenv.lib.maintainers.shlevy ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/aufs3/default.nix b/pkgs/os-specific/linux/aufs3/default.nix index a47dd9cb445c..bf73e6510f7f 100644 --- a/pkgs/os-specific/linux/aufs3/default.nix +++ b/pkgs/os-specific/linux/aufs3/default.nix @@ -30,6 +30,7 @@ stdenv.mkDerivation { 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/; diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index 79e02753f32c..32a29af148e5 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -293,6 +293,8 @@ rec { aufs3_0 = rec { name = "aufs3.0"; version = "3.0"; + utilRev = "a08d17d433567c7c2586c5fc2625a714b20fe155"; + utilHash = "4772c1c6a36da7bbd448057c227a9cd1856ccf72748765cf85421ab0c4e34535"; patch = makeAufs3StandalonePatch { inherit version; rev = "1067b9d8d64d23c70d905c9cd3c90a669e39c4d4"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ece8cfe76b8b..128daf26d168 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5598,6 +5598,10 @@ let aufs2_util = callPackage ../os-specific/linux/aufs2-util { }; + aufs3_util = if kernel.features ? aufs3 then + callPackage ../os-specific/linux/aufs3-util { } + else null; + blcr = callPackage ../os-specific/linux/blcr { #libtool = libtool_1_5; # libtool 2 causes a fork bomb };