summary refs log tree commit diff
path: root/pkgs/os-specific/linux/aufs2/default.nix
blob: 0cf3f4bd78248b23319439e0d09867e86b47ddc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchurl, kernel, perl, fetchgit }:

assert kernel.features ? aufsBase;

let version = "20100522"; in

stdenv.mkDerivation {
  name = "aufs2-${version}";

  src = fetchgit {
    url = "http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git";
    rev = "d950eef373ff1e0448ad3945b734da6ab050571d";
    sha256 = "816145b0341bd7862df50c058144cf6ebc25c05d2976f781ff0fe10d4559b853";
  };

  buildInputs = [ perl ];

  makeFlags = "KDIR=${kernel}/lib/modules/${kernel.version}/build";

  installPhase =
    ''
      ensureDir $out/lib/modules/${kernel.version}/misc
      cp aufs.ko $out/lib/modules/${kernel.version}/misc

      # Install the headers because aufs2-util requires them.
      cp -prvd include $out/
    '';

  meta = {
    description = "Another Unionfs implementation for Linux (second generation)";
    homepage = http://aufs.sourceforge.net/;
    maintainers = [ stdenv.lib.maintainers.eelco ];
    platforms = stdenv.lib.platforms.linux;
  };
}