2018-03-20 13:11:07 +01:00
|
|
|
{ stdenv, fetchFromGitHub, bison, flex, python3 , swig
|
|
|
|
, libsepol, libselinux, checkpolicy
|
|
|
|
, withGraphics ? false
|
|
|
|
}:
|
2013-11-28 09:58:06 +01:00
|
|
|
|
2018-03-20 13:11:07 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "setools";
|
|
|
|
version = "2017-11-10";
|
2013-11-28 09:58:06 +01:00
|
|
|
|
2015-08-01 00:14:58 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TresysTechnology";
|
2018-03-20 13:11:07 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = "a1aa0f33f5c428d3f9fe82960ed5de36f38047f7";
|
|
|
|
sha256 = "0iyj35fff93cprjkzbkg9dn5xz8dg5h2kjx3476fl625nxxskndn";
|
2013-11-28 09:58:06 +01:00
|
|
|
};
|
|
|
|
|
2018-03-20 13:11:07 +01:00
|
|
|
nativeBuildInputs = [ bison flex ];
|
|
|
|
buildInputs = [ libsepol swig ];
|
|
|
|
propagatedBuildInputs = [ enum34 libselinux networkx ]
|
|
|
|
++ optionals withGraphics [ pyqt5 ];
|
2014-08-14 17:55:12 +02:00
|
|
|
|
2018-03-20 13:11:07 +01:00
|
|
|
checkInputs = [ tox checkpolicy ];
|
|
|
|
preCheck = ''
|
|
|
|
export CHECKPOLICY=${checkpolicy}/bin/checkpolicy
|
|
|
|
'';
|
2016-02-12 19:02:25 +01:00
|
|
|
|
2018-03-20 13:11:07 +01:00
|
|
|
setupPyBuildFlags = [ "-i" ];
|
2013-11-28 09:58:06 +01:00
|
|
|
|
2018-03-20 13:11:07 +01:00
|
|
|
preBuild = ''
|
|
|
|
export SEPOL="${libsepol}/lib/libsepol.a"
|
|
|
|
'';
|
2013-11-28 09:58:06 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "SELinux Tools";
|
2018-03-20 13:11:07 +01:00
|
|
|
homepage = https://github.com/TresysTechnology/setools/wiki;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2013-11-28 09:58:06 +01:00
|
|
|
};
|
|
|
|
}
|