summary refs log tree commit diff
path: root/pkgs/os-specific/linux/selinux-python
diff options
context:
space:
mode:
authorLuka Blaskovic <lblasc@tvbeat.com>2019-08-17 16:13:30 +0000
committerLuka Blaskovic <lblasc@tvbeat.com>2019-08-17 17:50:12 +0000
commit5620d987e24ed46d8fa685ff1f10f577df4dbf6e (patch)
treeab8752d258b43d31b5ab510ca7aeb519f51b4723 /pkgs/os-specific/linux/selinux-python
parentd09152cb28dd868c1026126694a1c722ac66fe2d (diff)
downloadnixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.tar
nixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.tar.gz
nixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.tar.bz2
nixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.tar.lz
nixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.tar.xz
nixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.tar.zst
nixpkgs-5620d987e24ed46d8fa685ff1f10f577df4dbf6e.zip
selinux-python: 2.7 -> 2.9
Diffstat (limited to 'pkgs/os-specific/linux/selinux-python')
-rw-r--r--pkgs/os-specific/linux/selinux-python/default.nix28
1 files changed, 15 insertions, 13 deletions
diff --git a/pkgs/os-specific/linux/selinux-python/default.nix b/pkgs/os-specific/linux/selinux-python/default.nix
index b8f80a0124c..2ca88c32f13 100644
--- a/pkgs/os-specific/linux/selinux-python/default.nix
+++ b/pkgs/os-specific/linux/selinux-python/default.nix
@@ -8,13 +8,13 @@ with python3.pkgs;
 
 stdenv.mkDerivation rec {
   pname = "selinux-python";
-  version = "2.7";
-  se_release = "20170804";
-  se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases";
+  version = "2.9";
+
+  inherit (libsepol) se_release se_url;
 
   src = fetchurl {
     url = "${se_url}/${se_release}/selinux-python-${version}.tar.gz";
-    sha256 = "1va0y4b7cah7rprh04b3ylmwqgnivpkw5z2zw68nrafdbsbcn5s2";
+    sha256 = "1pjzsyay5535cxcjag7y7k193ajry0s0xc3dqv5905qd7cwval1n";
   };
 
   nativeBuildInputs = [ wrapPython ];
@@ -23,17 +23,19 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     substituteInPlace sepolicy/Makefile --replace "echo --root" "echo --prefix"
+    substituteInPlace sepolgen/src/share/Makefile --replace "/var/lib/sepolgen" \
+                                                            "\$PREFIX/var/lib/sepolgen"
   '';
 
-  preBuild = ''
-    makeFlagsArray+=("PREFIX=$out")
-    makeFlagsArray+=("DESTDIR=$out")
-    makeFlagsArray+=("LOCALEDIR=$out/share/locale")
-    makeFlagsArray+=("LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a")
-    makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions")
-    makeFlagsArray+=("PYTHON=${python3}/bin/python")
-    makeFlagsArray+=("PYTHONLIBDIR=lib/${python3.libPrefix}/site-packages")
-  '';
+  makeFlags = [
+    "PREFIX=$(out)"
+    "LOCALEDIR=$(out)/share/locale"
+    "BASHCOMPLETIONDIR=$(out)/share/bash-completion/completions"
+    "PYTHON=python"
+    "PYTHONLIBDIR=$(out)/${python.sitePackages}"
+    "LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a"
+  ];
+
 
   postFixup = ''
     wrapPythonPrograms