summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libcap/default.nix
blob: c279393d7a4070f8613ab94059db0b4a0fd95bc1 (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
{stdenv, fetchurl, attr, perl}:

assert stdenv.isLinux;

stdenv.mkDerivation rec {
  name = "libcap-${version}";
  version = "2.19";
  
  src = fetchurl {
    url = "mirror://kernel/linux/libs/security/linux-privs/kernel-2.6/${name}.tar.gz";
    sha256 = "0fdsz9j741npvh222f8p1y6l516z9liibiwdpdr3a4zg53m0pw45";
  };
  
  buildNativeInputs = [perl];
  propagatedBuildInputs = [attr];

  preConfigure = "cd libcap";

  makeFlags = "lib=lib prefix=$(out)";

  passthru = {
    postinst = n : ''
      mkdir -p $out/share/doc/${n}
      cp ../License $out/share/doc/${n}/License
    '';
  };

  postInstall = passthru.postinst name;
}