git.iko.soy/typeable/nixpkgs
on master help sign in
setools: 2015-02-12 -> 2017-11-10
commit07fe29741b0c9fa4d8f6554bfac2b0160fee1016 authorxeji <xeji@cat3.de> dateTue 20 Mar 2018, 13:11 (9 years ago) parentac90dff
1 file changed+28−21
pkgs/os-specific/linux/setools/default.nix+28−21
pkgs/os-specific/linux/setools/default.nix+28−21
@@ -1,35 +1,42 @@
1−{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, bison, flex
2−, python, swig2, tcl, libsepol, libselinux, libxml2, sqlite, bzip2 }:
1+{ stdenv, fetchFromGitHub, bison, flex, python3 , swig
2+, libsepol, libselinux, checkpolicy
3+, withGraphics ? false
4+}:
35
4−stdenv.mkDerivation rec {
5− name = "setools-2015-02-12";
6+with stdenv.lib;
7+with python3.pkgs;
8+
9+buildPythonApplication rec {
10+ pname = "setools";
11+ version = "2017-11-10";
612
713 src = fetchFromGitHub {
814 owner = "TresysTechnology";
9− repo = "setools3";
10− rev = "f1e5b208d507171968ca4d2eeefd7980f1004a3c";
11− sha256 = "02gzy2kpszhr13f0d9qfiwh2hj4201g2x366j53v5n5qz481aykd";
15+ repo = pname;
16+ rev = "a1aa0f33f5c428d3f9fe82960ed5de36f38047f7";
17+ sha256 = "0iyj35fff93cprjkzbkg9dn5xz8dg5h2kjx3476fl625nxxskndn";
1218 };
1319
14− configureFlags = [
15− "--disable-gui"
16− "--with-sepol-devel=${libsepol}"
17− "--with-selinux-devel=${libselinux}"
18− "--with-tcl=${tcl}/lib"
19− ];
20+ nativeBuildInputs = [ bison flex ];
21+ buildInputs = [ libsepol swig ];
22+ propagatedBuildInputs = [ enum34 libselinux networkx ]
23+ ++ optionals withGraphics [ pyqt5 ];
2024
21− hardeningDisable = [ "format" ];
25+ checkInputs = [ tox checkpolicy ];
26+ preCheck = ''
27+ export CHECKPOLICY=${checkpolicy}/bin/checkpolicy
28+ '';
2229
23− NIX_CFLAGS_COMPILE = "-fstack-protector-all";
24− NIX_LDFLAGS = "-L${libsepol}/lib -L${libselinux}/lib";
30+ setupPyBuildFlags = [ "-i" ];
2531
26− nativeBuildInputs = [ autoreconfHook pkgconfig python swig2 bison flex ];
27− buildInputs = [ tcl libxml2 sqlite bzip2 ];
32+ preBuild = ''
33+ export SEPOL="${libsepol}/lib/libsepol.a"
34+ '';
2835
2936 meta = {
3037 description = "SELinux Tools";
31− homepage = http://oss.tresys.com/projects/setools/;
32− license = stdenv.lib.licenses.gpl2;
33− platforms = stdenv.lib.platforms.linux;
38+ homepage = https://github.com/TresysTechnology/setools/wiki;
39+ license = licenses.gpl2;
40+ platforms = platforms.linux;
3441 };
3542}