Files
nixpkgs/pkgs/by-name/se/setools/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

72 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
python3Packages,
libsepol,
libselinux,
checkpolicy,
withGraphics ? false,
}:
python3Packages.buildPythonApplication rec {
pname = "setools";
version = "4.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "SELinuxProject";
repo = "setools";
tag = version;
hash = "sha256-UZisEbHx3zO92gmRQSYsI8TmY9MjCP7AWNAESYklAkk=";
};
build-system = with python3Packages; [
cython
setuptools
];
buildInputs = [ libsepol ];
dependencies =
with python3Packages;
[
libselinux
setuptools
]
++ lib.optionals withGraphics [ pyqt5 ];
optional-dependencies = {
analysis = with python3Packages; [
networkx
pygraphviz
];
};
nativeCheckInputs = [
python3Packages.tox
checkpolicy
];
setupPyBuildFlags = [ "-i" ];
preBuild = ''
export SEPOL="${lib.getLib libsepol}/lib/libsepol.a"
'';
preCheck = ''
export CHECKPOLICY=${lib.getExe checkpolicy}
'';
meta = {
description = "SELinux Policy Analysis Tools";
homepage = "https://github.com/SELinuxProject/setools";
changelog = "https://github.com/SELinuxProject/setools/blob/${version}/ChangeLog";
license = with lib.licenses; [
gpl2Only
lgpl21Plus
];
maintainers = [ ];
platforms = lib.platforms.linux;
};
}