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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
946 B
Nix
Raw Normal View History

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