1{ stdenv, fetchurl, attr, perl }:
2
3stdenv.mkDerivation rec {
4 name = "libcap-${version}";
5 version = "2.24";
6
7 src = fetchurl {
8 url = "mirror://kernel/linux/libs/security/linux-privs/libcap2/${name}.tar.xz";
9 sha256 = "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f";
10 };
11
12 nativeBuildInputs = [ perl ];
13 propagatedBuildInputs = [ attr ];
14
15 preConfigure = "cd libcap";
16
17 makeFlags = "lib=lib prefix=$(out)";
18
19 passthru = {
20 postinst = n : ''
21 mkdir -p $out/share/doc/${n}
22 cp ../License $out/share/doc/${n}/License
23 '';
24 };
25
26 postInstall = passthru.postinst name;
27
28 meta = {
29 description = "Library for working with POSIX capabilities";
30 platforms = stdenv.lib.platforms.linux;
31 };
32}