about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/aufs2.1-util/default.nix
blob: a12a0900ca40513d3c12dcbd37d5a3d0829fbb56 (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
36
37
38
39
40
41
{ stdenv, fetchgit, kernel, aufs2_1 }:

let version = "20110217"; in

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

  src = fetchgit {
    url = "git://git.c3sl.ufpr.br/aufs/aufs2-util.git";
    rev = "0f0cf3f2ae39906fd4b5376cdaa24e9fe64a03f4";
    sha256 = "0fce5601b67efe8b5652a813ae612348bf4503aa71056cd31a5ed0406632e364";
  };

  buildInputs = [ aufs2_1 ];

  makeFlags =
    [ "KDIR=${kernel}/lib/modules/${kernel.version}/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 AUFS2.1";
    homepage = http://aufs.sourceforge.net/;
    maintainers = [ stdenv.lib.maintainers.eelco 
                    stdenv.lib.maintainers.shlevy ];
    platforms = stdenv.lib.platforms.linux;
  };
}