nixpkgs/pkgs/os-specific/linux/setools/default.nix

43 lines
990 B
Nix
Raw Normal View History

2018-03-20 05:11:07 -07:00
{ stdenv, fetchFromGitHub, bison, flex, python3 , swig
, libsepol, libselinux, checkpolicy
, withGraphics ? false
}:
2018-03-20 05:11:07 -07:00
with stdenv.lib;
with python3.pkgs;
buildPythonApplication rec {
pname = "setools";
version = "4.2.0";
2015-07-31 15:14:58 -07:00
src = fetchFromGitHub {
owner = "SELinuxProject";
2018-03-20 05:11:07 -07:00
repo = pname;
rev = version;
sha256 = "1bjwcvr6rjx79cdcvaxn68bdrnl4f2a8gnnqsngdxhkhwpddksjy";
};
2019-03-24 11:52:40 -07:00
nativeBuildInputs = [ bison flex swig ];
buildInputs = [ libsepol ];
2018-03-20 05:11:07 -07:00
propagatedBuildInputs = [ enum34 libselinux networkx ]
++ optionals withGraphics [ pyqt5 ];
2018-03-20 05:11:07 -07:00
checkInputs = [ tox checkpolicy ];
preCheck = ''
export CHECKPOLICY=${checkpolicy}/bin/checkpolicy
'';
2016-02-12 10:02:25 -08:00
2018-03-20 05:11:07 -07:00
setupPyBuildFlags = [ "-i" ];
2018-03-20 05:11:07 -07:00
preBuild = ''
2018-06-21 02:40:31 -07:00
export SEPOL="${stdenv.lib.getLib libsepol}/lib/libsepol.a"
2018-03-20 05:11:07 -07:00
'';
meta = {
description = "SELinux Policy Analysis Tools";
homepage = https://github.com/SELinuxProject/setools;
2018-03-20 05:11:07 -07:00
license = licenses.gpl2;
platforms = platforms.linux;
};
}