git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #36978 from xeji/selinux-2-7
00a4300Jörg Thalheim
pkgs/os-specific/linux/checkpolicy/default.nix+2−11
@@ -2,27 +2,18 @@
2
2
3stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
4 name = "checkpolicy-${version}";
4 name = "checkpolicy-${version}";
5− version = "2.4";
5+ version = "2.7";
6 inherit (libsepol) se_release se_url;
6 inherit (libsepol) se_release se_url;
7
7
8 src = fetchurl {
8 src = fetchurl {
9 url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
9 url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
10− sha256 = "1m5wjm43lzp6bld8higsvdm2dkddydihhwv9qw2w9r4dm0largcv";
10+ sha256 = "009j9jc0hi4l7k8f21hn8fm25n0mqgzdpd4nk30nds6d3nglf4sl";
11 };
11 };
12
12
13− # Don't build tests
14− postPatch = ''
15− sed '/-C test/d' -i Makefile
16− sed '1i#include <ctype.h>' -i checkpolicy.c
17− '';
18−
19 nativeBuildInputs = [ bison flex ];
13 nativeBuildInputs = [ bison flex ];
20 buildInputs = [ libsepol ];
14 buildInputs = [ libsepol ];
21
15
22− NIX_CFLAGS_COMPILE = "-fstack-protector-all";
23−
24 preBuild = ''
16 preBuild = ''
25− makeFlagsArray+=("LEX=flex")
26 makeFlagsArray+=("LIBDIR=${libsepol}/lib")
17 makeFlagsArray+=("LIBDIR=${libsepol}/lib")
27 makeFlagsArray+=("PREFIX=$out")
18 makeFlagsArray+=("PREFIX=$out")
28 '';
19 '';
pkgs/os-specific/linux/libselinux/default.nix+11−25
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre
1+{ stdenv, fetchurl, pcre, pkgconfig, libsepol
2, enablePython ? true, swig ? null, python ? null
2, enablePython ? true, swig ? null, python ? null
3}:
3}:
4
4
@@ -8,48 +8,34 @@ with stdenv.lib;
8
8
9stdenv.mkDerivation rec {
9stdenv.mkDerivation rec {
10 name = "libselinux-${version}";
10 name = "libselinux-${version}";
11− version = "2.4";
11+ version = "2.7";
12 inherit (libsepol) se_release se_url;
12 inherit (libsepol) se_release se_url;
13
13
14 src = fetchurl {
14 src = fetchurl {
15 url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
15 url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
16− sha256 = "0yqg73ns97jwjh1iyv0jr5qxb8k5sqq5ywfkx11lzfn5yj8k0126";
16+ sha256 = "0mwcq78v6ngbq06xmb9dvilpg0jnl2vs9fgrpakhmmiskdvc1znh";
17 };
17 };
18
18
19 nativeBuildInputs = [ pkgconfig ];
19 nativeBuildInputs = [ pkgconfig ];
20 buildInputs = [ libsepol pcre ]
20 buildInputs = [ libsepol pcre ]
21 ++ optionals enablePython [ swig python ];
21 ++ optionals enablePython [ swig python ];
22
22
23− # Avoid this false warning:
23+ # drop fortify here since package uses it by default, leading to compile error:
24− # avc_internal.c: In function 'avc_netlink_receive':
24+ # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
25− # avc_internal.c:105:25: error: cast increases required alignment of target type [-Werror=cast-align]
25+ hardeningDisable = [ "fortify" ];
26− # struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
27− # ^
28−
29− NIX_CFLAGS_COMPILE = "-std=gnu89 -Wno-error=cast-align";
30−
31− # Unreleased upstream patch that fixes Python package issue arising
32− # from recent SWIG changes.
33− patches = optional enablePython (fetchpatch {
34− name = "fix-python-swig.patch";
35− url = "https://github.com/SELinuxProject/selinux/commit/a9604c30a5e2f71007d31aa6ba41cf7b95d94822.patch";
36− sha256 = "0mjrclh0sd8m7vq0wvl6pg29ss415j3kn0266v8ixy4fprafagfp";
37− stripLen = 1;
38− });
39
26
40 postPatch = optionalString enablePython ''
27 postPatch = optionalString enablePython ''
41 sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
28 sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
42− ''
43− + ''
44− sed '1i#include <sys/uio.h>' -i src/setrans_client.c
45 '';
29 '';
46
30
31+ # fix install locations
47 preBuild = ''
32 preBuild = ''
48− # Build fails without this precreated
49− mkdir -p $out/include
50−
51 makeFlagsArray+=("PREFIX=$out")
33 makeFlagsArray+=("PREFIX=$out")
52 makeFlagsArray+=("DESTDIR=$out")
34 makeFlagsArray+=("DESTDIR=$out")
35+ makeFlagsArray+=("MAN3DIR=$out/share/man/man3")
36+ makeFlagsArray+=("MAN5DIR=$out/share/man/man5")
37+ makeFlagsArray+=("MAN8DIR=$out/share/man/man8")
38+ makeFlagsArray+=("PYSITEDIR=$out/lib/${python.libPrefix}/site-packages")
53 '';
39 '';
54
40
55 installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
41 installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
pkgs/os-specific/linux/libsemanage/default.nix+15−13
@@ -1,31 +1,33 @@
1−{ stdenv, fetchurl, bison, flex, libsepol, libselinux, ustr, bzip2, libaudit }:
1+{ stdenv, fetchurl, pkgconfig, bison, flex, libsepol, libselinux, bzip2, libaudit
2+, enablePython ? true, swig ? null, python ? null
3+}:
4+
5+with stdenv.lib;
2
6
3stdenv.mkDerivation rec {
7stdenv.mkDerivation rec {
4 name = "libsemanage-${version}";
8 name = "libsemanage-${version}";
5− version = "2.4";
9+ version = "2.7";
6 inherit (libsepol) se_release se_url;
10 inherit (libsepol) se_release se_url;
7
11
8 src = fetchurl {
12 src = fetchurl {
9 url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
13 url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
10− sha256 = "1134ka4mi4387ac5yv68bpp2y7ln5xxhwp07xhqnay0nxzjaqk0s";
14+ sha256 = "0xnlp1yg8b1aqc6kq3pss1i1nl06rfj4x4pyl5blasnf2ivlgs87";
11 };
15 };
12
16
13− nativeBuildInputs = [ bison flex ];
17+ nativeBuildInputs = [ bison flex pkgconfig ];
14− buildInputs = [ libsepol libselinux ustr bzip2 libaudit ];
18+ buildInputs = [ libsepol libselinux bzip2 libaudit ]
15−
19+ ++ optionals enablePython [ swig python ];
16− NIX_CFLAGS_COMPILE = [
17− "-fstack-protector-all"
18− "-std=gnu89"
19− # these were added to fix build with gcc7. review on update
20− "-Wno-error=format-truncation"
21− "-Wno-error=implicit-fallthrough"
22− ];
23
20
24 preBuild = ''
21 preBuild = ''
25 makeFlagsArray+=("PREFIX=$out")
22 makeFlagsArray+=("PREFIX=$out")
26 makeFlagsArray+=("DESTDIR=$out")
23 makeFlagsArray+=("DESTDIR=$out")
24+ makeFlagsArray+=("MAN3DIR=$out/share/man/man3")
25+ makeFlagsArray+=("MAN5DIR=$out/share/man/man5")
26+ makeFlagsArray+=("PYSITEDIR=$out/lib/${python.libPrefix}/site-packages")
27 '';
27 '';
28
28
29+ installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ];
30+
29 meta = libsepol.meta // {
31 meta = libsepol.meta // {
30 description = "Policy management tools for SELinux";
32 description = "Policy management tools for SELinux";
31 license = stdenv.lib.licenses.lgpl21;
33 license = stdenv.lib.licenses.lgpl21;
pkgs/os-specific/linux/libsepol/default.nix+5−4
@@ -2,13 +2,13 @@
2
2
3stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
4 name = "libsepol-${version}";
4 name = "libsepol-${version}";
5− version = "2.4";
5+ version = "2.7";
6− se_release = "20150202";
6+ se_release = "20170804";
7 se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases";
7 se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases";
8
8
9 src = fetchurl {
9 src = fetchurl {
10 url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
10 url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
11− sha256 = "0ncnwhpc1gx4hrrb822fqkwy5h75zzngsrfkd5mlqh1jk7aib419";
11+ sha256 = "1rzr90d3f1g5wy1b8sh6fgnqb9migys2zgpjmpakn6lhxkc3p7fn";
12 };
12 };
13
13
14 nativeBuildInputs = [ flex ];
14 nativeBuildInputs = [ flex ];
@@ -16,9 +16,10 @@ stdenv.mkDerivation rec {
16 preBuild = ''
16 preBuild = ''
17 makeFlagsArray+=("PREFIX=$out")
17 makeFlagsArray+=("PREFIX=$out")
18 makeFlagsArray+=("DESTDIR=$out")
18 makeFlagsArray+=("DESTDIR=$out")
19+ makeFlagsArray+=("MAN8DIR=$out/share/man/man8")
20+ makeFlagsArray+=("MAN3DIR=$out/share/man/man3")
19 '';
21 '';
20
22
21− NIX_CFLAGS_COMPILE = [ "-Wno-error=implicit-fallthrough" ];
22
23
23 passthru = { inherit se_release se_url; };
24 passthru = { inherit se_release se_url; };
24
25
pkgs/os-specific/linux/policycoreutils/default.nix+11−42
@@ -1,64 +1,33 @@
1−{ stdenv, fetchurl, pythonPackages, gettext
2−, setools, libsepol, libselinux, libcap_ng, libsemanage, sepolgen
1+{ stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage }:
3−}:
4
2
5stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
6 name = "policycoreutils-${version}";
4 name = "policycoreutils-${version}";
7− version = "2.4";
5+ version = "2.7";
8 inherit (libsepol) se_release se_url;
6 inherit (libsepol) se_release se_url;
9
7
10 src = fetchurl {
8 src = fetchurl {
11 url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz";
9 url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz";
12− sha256 = "0y9l9k60iy21hj0lcvfdfxs1fxydg6d3pxp9rhy7hwr4y5vgh6dq";
10+ sha256 = "1x742c7lkw30namhkw87yg7z384qzqjz0pvmqs0lk19v6958l6qa";
13 };
11 };
14
12
15− patches = [ ./fix-printf-type.patch ];
16−
17 postPatch = ''
13 postPatch = ''
18− # Fix references to libsepol.a
19− find . -name Makefile -exec sed -i 's,[^ ]*/libsepol.a,${libsepol}/lib/libsepol.a,g' {} \;
20−
21 # Fix install references
14 # Fix install references
22− substituteInPlace po/Makefile --replace /usr/bin/install install
15+ substituteInPlace po/Makefile \
23−
16+ --replace /usr/bin/install install --replace /usr/share /share
24− # Fix references to /usr/share
17+ substituteInPlace newrole/Makefile --replace /usr/share /share
25− grep -r '/usr/share' | awk -F: '{print $1}' | xargs sed -i "s,\(\$(DESTDIR)\)*/usr/share,$out/share,g"
26−
27− # Fix sepolicy install
28− sed -i "s,\(setup.py install\).*,\1 --prefix=$out,g" sepolicy/Makefile
29−
30− # Fix setuid install
31− sed -i 's|-m 4755|-m 755|' sandbox/Makefile
32 '';
18 '';
33
19
34− nativeBuildInputs = [ pythonPackages.python gettext ];
20+ nativeBuildInputs = [ gettext ];
35− buildInputs = [ setools libsepol libselinux libcap_ng libsemanage ];
21+ buildInputs = [ libsepol libselinux libsemanage ];
36− pythonPath = [ libselinux sepolgen ];
37
22
38 preBuild = ''
23 preBuild = ''
39 makeFlagsArray+=("PREFIX=$out")
24 makeFlagsArray+=("PREFIX=$out")
40 makeFlagsArray+=("DESTDIR=$out")
25 makeFlagsArray+=("DESTDIR=$out")
26+ makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions")
27+ makeFlagsArray+=("LOCALEDIR=$out/share/locale")
28+ makeFlagsArray+=("MAN5DIR=$out/share/man/man5")
41 '';
29 '';
42
30
43− # Creation of the system-config-selinux directory is broken
44− preInstall = ''
45− mkdir -p $out/share/system-config-selinux
46− '';
47−
48− # Fix the python scripts to include paths to libraries
49− # NOTE: We are not using wrapPythonPrograms or makeWrapper as these scripts
50− # purge the environment as a security measure
51− postInstall = ''
52− grep -r '#!.*python' $out/bin | awk -F: '{print $1}' | xargs sed -i "1a \
53− import sys; \
54− sys.path.append('$(toPythonPath "$out")'); \
55− ${stdenv.lib.flip stdenv.lib.concatMapStrings pythonPath (lib: ''
56− sys.path.append('$(toPythonPath "${lib}")'); \
57− '')}"
58− '';
59−
60− NIX_CFLAGS_COMPILE = "-fstack-protector-all";
61−
62 meta = with stdenv.lib; {
31 meta = with stdenv.lib; {
63 description = "SELinux policy core utilities";
32 description = "SELinux policy core utilities";
64 license = licenses.gpl2;
33 license = licenses.gpl2;
pkgs/os-specific/linux/policycoreutils/fix-printf-type.patchdeleted−12
@@ -1,12 +0,0 @@
1−diff -Nru policycoreutils-2.4/setfiles/restore.c policycoreutils-2.4.new/setfiles/restore.c
2−--- policycoreutils-2.4/setfiles/restore.c 2015-02-02 09:38:10.000000000 -0500
3−+++ policycoreutils-2.4.new/setfiles/restore.c 2015-08-29 20:44:13.693023222 -0400
4−@@ -118,7 +118,7 @@
5− r_opts->count++;
6− if (r_opts->count % STAR_COUNT == 0) {
7− if (r_opts->progress == 1) {
8−- fprintf(stdout, "\r%luk", (size_t) r_opts->count / STAR_COUNT );
9−+ fprintf(stdout, "\r%zuk", (size_t) r_opts->count / STAR_COUNT );
10− } else {
11− if (r_opts->nfile > 0) {
12− progress = (r_opts->count < r_opts->nfile) ? (100.0 * r_opts->count / r_opts->nfile) : 100;
pkgs/os-specific/linux/selinux-python/default.nixnew file+49
@@ -0,0 +1,49 @@
1+{ stdenv, fetchurl, python3
2+, libselinux, libsemanage, libsepol, setools }:
3+
4+# this is python3 only because setools only supports python3
5+
6+with stdenv.lib;
7+with python3.pkgs;
8+
9+stdenv.mkDerivation rec {
10+ name = "selinux-python-${version}";
11+ version = "2.7";
12+ se_release = "20170804";
13+ se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases";
14+
15+ src = fetchurl {
16+ url = "${se_url}/${se_release}/selinux-python-${version}.tar.gz";
17+ sha256 = "1va0y4b7cah7rprh04b3ylmwqgnivpkw5z2zw68nrafdbsbcn5s2";
18+ };
19+
20+ nativeBuildInputs = [ wrapPython ];
21+ buildInputs = [ libsepol python3 ];
22+ propagatedBuildInputs = [ libselinux libsemanage setools ipy ];
23+
24+ postPatch = ''
25+ substituteInPlace sepolicy/Makefile --replace "echo --root" "echo --prefix"
26+ '';
27+
28+ preBuild = ''
29+ makeFlagsArray+=("PREFIX=$out")
30+ makeFlagsArray+=("DESTDIR=$out")
31+ makeFlagsArray+=("LOCALEDIR=$out/share/locale")
32+ makeFlagsArray+=("LIBSEPOLA=${libsepol}/lib/libsepol.a")
33+ makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions")
34+ makeFlagsArray+=("PYTHON=${python3}/bin/python")
35+ makeFlagsArray+=("PYTHONLIBDIR=lib/${python3.libPrefix}/site-packages")
36+ '';
37+
38+ postFixup = ''
39+ wrapPythonPrograms
40+ '';
41+
42+ meta = {
43+ description = "SELinux policy core utilities written in Python";
44+ license = licenses.gpl2;
45+ homepage = https://selinuxproject.org;
46+ platforms = platforms.linux;
47+ };
48+}
49+
pkgs/os-specific/linux/selinux-sandbox/default.nixnew file+61
@@ -0,0 +1,61 @@
1+{ stdenv, fetchurl, bash, coreutils, python3
2+, libcap_ng, policycoreutils, selinux-python, dbus
3+, xorgserver, openbox, xmodmap }:
4+
5+# this is python3 only as it depends on selinux-python
6+
7+with stdenv.lib;
8+with python3.pkgs;
9+
10+stdenv.mkDerivation rec {
11+ name = "selinux-sandbox-${version}";
12+ version = "2.7";
13+ se_release = "20170804";
14+
15+ src = fetchurl {
16+ url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${se_release}/selinux-sandbox-${version}.tar.gz";
17+ sha256 = "0hf5chm90iapb42njaps6p5460ys3ajh5446ja544vdbh01n544l";
18+ };
19+
20+ nativeBuildInputs = [ wrapPython ];
21+ buildInputs = [ bash coreutils libcap_ng policycoreutils python3 xorgserver openbox xmodmap dbus ];
22+ propagatedBuildInputs = [ pygobject3 selinux-python ];
23+
24+ postPatch = ''
25+ # Fix setuid install
26+ substituteInPlace Makefile --replace "-m 4755" "-m 755"
27+ substituteInPlace sandboxX.sh \
28+ --replace "#!/bin/sh" "#!${bash}/bin/sh" \
29+ --replace "/usr/share/sandbox/start" "${placeholder "out"}/share/sandbox/start" \
30+ --replace "/usr/bin/cut" "${coreutils}/bin/cut" \
31+ --replace "/usr/bin/Xephyr" "${xorgserver}/bin/Xepyhr" \
32+ --replace "secon" "${policycoreutils}/bin/secon"
33+ substituteInPlace sandbox \
34+ --replace "/usr/sbin/seunshare" "$out/bin/seunshare" \
35+ --replace "/usr/share/sandbox" "$out/share/sandbox" \
36+ --replace "/usr/share/locale" "${policycoreutils}/share/locale" \
37+ --replace "/usr/bin/openbox" "${openbox}/bin/openbox" \
38+ --replace "#!/bin/sh" "#!${bash}/bin/sh" \
39+ --replace "dbus-" "${dbus}/bin/dbus-" \
40+ --replace "/usr/bin/xmodmap" "${xmodmap}/bin/xmodmap" \
41+ --replace "/usr/bin/shred" "${coreutils}/bin/shred" \
42+ --replace "/usr/bin/test" "${coreutils}/bin/test" \
43+ '';
44+
45+ preBuild = ''
46+ makeFlagsArray+=("PREFIX=$out")
47+ makeFlagsArray+=("DESTDIR=$out")
48+ '';
49+
50+ postFixup = ''
51+ wrapPythonPrograms
52+ '';
53+
54+ meta = {
55+ description = "SELinux sandbox utility";
56+ license = licenses.gpl2;
57+ homepage = https://selinuxproject.org;
58+ platforms = platforms.linux;
59+ };
60+}
61+
pkgs/os-specific/linux/setools/default.nix+28−21
@@ -1,35 +1,42 @@
1−{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, bison, flex
1+{ stdenv, fetchFromGitHub, bison, flex, python3 , swig
2−, python, swig2, tcl, libsepol, libselinux, libxml2, sqlite, bzip2 }:
2+, libsepol, libselinux, checkpolicy
3+, withGraphics ? false
4+}:
3
5
4−stdenv.mkDerivation rec {
6+with stdenv.lib;
7+with python3.pkgs;
8+
9+buildPythonApplication rec {
5− name = "setools-2015-02-12";
10+ pname = "setools";
11+ version = "2017-11-10";
6
12
7 src = fetchFromGitHub {
13 src = fetchFromGitHub {
8 owner = "TresysTechnology";
14 owner = "TresysTechnology";
9− repo = "setools3";
15+ repo = pname;
10− rev = "f1e5b208d507171968ca4d2eeefd7980f1004a3c";
16+ rev = "a1aa0f33f5c428d3f9fe82960ed5de36f38047f7";
11− sha256 = "02gzy2kpszhr13f0d9qfiwh2hj4201g2x366j53v5n5qz481aykd";
17+ sha256 = "0iyj35fff93cprjkzbkg9dn5xz8dg5h2kjx3476fl625nxxskndn";
12 };
18 };
13
19
14− configureFlags = [
20+ nativeBuildInputs = [ bison flex ];
15− "--disable-gui"
21+ buildInputs = [ libsepol swig ];
16− "--with-sepol-devel=${libsepol}"
22+ propagatedBuildInputs = [ enum34 libselinux networkx ]
17− "--with-selinux-devel=${libselinux}"
23+ ++ optionals withGraphics [ pyqt5 ];
18− "--with-tcl=${tcl}/lib"
19− ];
20
24
21− hardeningDisable = [ "format" ];
25+ checkInputs = [ tox checkpolicy ];
26+ preCheck = ''
27+ export CHECKPOLICY=${checkpolicy}/bin/checkpolicy
28+ '';
22
29
23− NIX_CFLAGS_COMPILE = "-fstack-protector-all";
30+ setupPyBuildFlags = [ "-i" ];
24− NIX_LDFLAGS = "-L${libsepol}/lib -L${libselinux}/lib";
25
31
26− nativeBuildInputs = [ autoreconfHook pkgconfig python swig2 bison flex ];
32+ preBuild = ''
27− buildInputs = [ tcl libxml2 sqlite bzip2 ];
33+ export SEPOL="${libsepol}/lib/libsepol.a"
34+ '';
28
35
29 meta = {
36 meta = {
30 description = "SELinux Tools";
37 description = "SELinux Tools";
31− homepage = http://oss.tresys.com/projects/setools/;
38+ homepage = https://github.com/TresysTechnology/setools/wiki;
32− license = stdenv.lib.licenses.gpl2;
39+ license = licenses.gpl2;
33− platforms = stdenv.lib.platforms.linux;
40+ platforms = platforms.linux;
34 };
41 };
35}
42}
pkgs/os-specific/linux/systemd/default.nix+2−1
@@ -10,6 +10,7 @@
10, getent
10, getent
11, hostPlatform
11, hostPlatform
12, buildPackages
12, buildPackages
13+, withSelinux ? false, libselinux
13}:
14}:
14
15
15assert stdenv.isLinux;
16assert stdenv.isLinux;
@@ -44,7 +45,7 @@ in stdenv.mkDerivation rec {
44 iptables gnu-efi
45 iptables gnu-efi
45 # This is actually native, but we already pull it from buildPackages
46 # This is actually native, but we already pull it from buildPackages
46 pythonLxmlEnv
47 pythonLxmlEnv
47− ];
48+ ] ++ stdenv.lib.optionals withSelinux [ libselinux ];
48
49
49 #dontAddPrefix = true;
50 #dontAddPrefix = true;
50
51
pkgs/top-level/all-packages.nix+7
@@ -11393,6 +11393,8 @@ with pkgs;
11393
11393
11394 sblim-sfcc = callPackage ../development/libraries/sblim-sfcc {};
11394 sblim-sfcc = callPackage ../development/libraries/sblim-sfcc {};
11395
11395
11396+ selinux-sandbox = callPackage ../os-specific/linux/selinux-sandbox { };
11397+
11396 serd = callPackage ../development/libraries/serd {};
11398 serd = callPackage ../development/libraries/serd {};
11397
11399
11398 serf = callPackage ../development/libraries/serf {};
11400 serf = callPackage ../development/libraries/serf {};
@@ -20704,6 +20706,11 @@ with pkgs;
20704 seafile-shared = callPackage ../misc/seafile-shared { };
20706 seafile-shared = callPackage ../misc/seafile-shared { };
20705
20707
20706 serviio = callPackage ../servers/serviio {};
20708 serviio = callPackage ../servers/serviio {};
20709+ selinux-python = callPackage ../os-specific/linux/selinux-python {
20710+ # needs python3 bindings
20711+ libselinux = libselinux.override { python = python3; };
20712+ libsemanage = libsemanage.override { python = python3; };
20713+ };
20707
20714
20708 slock = callPackage ../misc/screensavers/slock {
20715 slock = callPackage ../misc/screensavers/slock {
20709 conf = config.slock.conf or null;
20716 conf = config.slock.conf or null;