nixpkgs/pkgs/os-specific/linux/setools/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

43 lines
952 B
Nix

{ lib, fetchFromGitHub, python3
, libsepol, libselinux, checkpolicy
, withGraphics ? false
}:
with lib;
with python3.pkgs;
buildPythonApplication rec {
pname = "setools";
version = "4.4.0";
src = fetchFromGitHub {
owner = "SELinuxProject";
repo = pname;
rev = version;
sha256 = "1qvd5j6zwq4fmlahg45swjplhif2z89x7s6pnp07gvcp2fbqdsh5";
};
nativeBuildInputs = [ cython ];
buildInputs = [ libsepol ];
propagatedBuildInputs = [ enum34 libselinux networkx ]
++ optionals withGraphics [ pyqt5 ];
nativeCheckInputs = [ tox checkpolicy ];
preCheck = ''
export CHECKPOLICY=${checkpolicy}/bin/checkpolicy
'';
setupPyBuildFlags = [ "-i" ];
preBuild = ''
export SEPOL="${lib.getLib libsepol}/lib/libsepol.a"
'';
meta = {
description = "SELinux Policy Analysis Tools";
homepage = "https://github.com/SELinuxProject/setools";
license = licenses.gpl2;
platforms = platforms.linux;
};
}