summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libcap/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/libcap/default.nix')
-rw-r--r--pkgs/os-specific/linux/libcap/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix
new file mode 100644
index 00000000000..b7b1c07072f
--- /dev/null
+++ b/pkgs/os-specific/linux/libcap/default.nix
@@ -0,0 +1,21 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "libcap-1.10";
+  src = fetchurl {
+    url = http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/libcap-1.10.tar.bz2;
+    md5 = "4426a413128142cab89eb2e6f13d8571";
+  };
+  
+  preBuild = "
+    sed 's|/usr/include|${stdenv.glibc}/include|' < libcap/Makefile > libcap/Makefile.tmp
+    mv libcap/Makefile.tmp libcap/Makefile
+
+    installFlags=\"LIBDIR=$out/lib INCDIR=$out/include SBINDIR=$out/sbin MANDIR=$out/man\"
+  ";
+
+  patches = [
+    # Borrowed from http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libcap/files/libcap-1.10-syscall.patch?rev=1.2&view=log.
+    ./syscall.patch
+  ];
+}