1 { lib, fetchFromGitHub, python3
2 , libsepol, libselinux, checkpolicy
6 python3.pkgs.buildPythonApplication rec {
10 src = fetchFromGitHub {
11 owner = "SELinuxProject";
13 rev = "refs/tags/${version}";
14 hash = "sha256-/6dOzSz2Do4d6TSS50fuak0CysoQ532zJ0bJ532BUCE=";
17 nativeBuildInputs = [ python3.pkgs.cython ];
18 buildInputs = [ libsepol ];
19 propagatedBuildInputs = with python3.pkgs; [ enum34 libselinux networkx setuptools ]
20 ++ lib.optionals withGraphics [ pyqt5 ];
22 nativeCheckInputs = [ python3.pkgs.tox checkpolicy ];
24 export CHECKPOLICY=${checkpolicy}/bin/checkpolicy
27 setupPyBuildFlags = [ "-i" ];
30 export SEPOL="${lib.getLib libsepol}/lib/libsepol.a"
34 description = "SELinux Policy Analysis Tools";
35 homepage = "https://github.com/SELinuxProject/setools";
36 license = licenses.gpl2Only;
37 platforms = platforms.linux;