summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libselinux/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-02-24 13:25:53 +0100
committerVladimír Čunát <vcunat@gmail.com>2013-02-24 13:25:53 +0100
commitde70e3739d2e69806ddfd47efa8b21aa1864b15e (patch)
treea36cce23a53c3a9fd9b7b4e2331572ecbfb2b76c /pkgs/os-specific/linux/libselinux/default.nix
parentf6b28fad730253d58a89776862cc12a000afbd20 (diff)
downloadnixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.tar
nixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.tar.gz
nixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.tar.bz2
nixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.tar.lz
nixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.tar.xz
nixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.tar.zst
nixpkgs-de70e3739d2e69806ddfd47efa8b21aa1864b15e.zip
SELinux fixes and updates to 2012-09-24
Diffstat (limited to 'pkgs/os-specific/linux/libselinux/default.nix')
-rw-r--r--pkgs/os-specific/linux/libselinux/default.nix31
1 files changed, 25 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix
index 4be88a20e24..873065d5424 100644
--- a/pkgs/os-specific/linux/libselinux/default.nix
+++ b/pkgs/os-specific/linux/libselinux/default.nix
@@ -1,15 +1,34 @@
-{stdenv, fetchurl, libsepol}:
+{ stdenv, fetchurl, pkgconfig, libsepol, pcre }:
 
 stdenv.mkDerivation rec {
   name = "libselinux-${version}";
-  version = "2.0.98";
+  version = "2.1.12";
+  inherit (libsepol) se_release se_url;
 
   src = fetchurl {
-    url = "http://userspace.selinuxproject.org/releases/20101221/devel/${name}.tar.gz";
-    sha256 = "00irm7nyakgi4z8d6dlm6c70fkbl6rzk5w1w0ny2c564yw0d0dlz";
+    url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
+    sha256 = "17navgvljgq35bljzcdwjdj3khajc27s15binr51xkp0h29qgbcd";
   };
 
-  buildInputs = [ libsepol ];
+  patch_src = fetchurl {
+    url = "http://dev.gentoo.org/~swift/patches/libselinux/patchbundle-${name}-r2.tar.gz";
+    sha256 = "08zaas8iwyf4w9ll1ylyv4gril1nfarckd5h1l53563sxzyf7dqh";
+  };
+
+  patches = [ ./fPIC.patch ]; # libsemanage seems to need -fPIC everywhere
+
+  buildInputs = [ pkgconfig libsepol pcre ];
 
-  preBuild = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
+  prePatch = ''
+    tar xvf ${patch_src}
+    for p in gentoo-patches/*.patch; do
+      patch -p1 < "$p"
+    done
+  '';
+
+  preInstall = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
+
+  meta = {
+    inherit (libsepol.meta) homepage platforms maintainers;
+  };
 }