2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, libcap
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-prctl";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "1.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "b4ca9a25a7d4f1ace4fffd1f3a2e64ef5208fe05f929f3edd5e27081ca7e67ce";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libcap ];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Intel MPX support was removed in GCC 9.1 & Linux kernel 5.6
|
|
|
|
"test_mpx"
|
|
|
|
|
|
|
|
# The Nix build sandbox has no_new_privs already enabled
|
|
|
|
"test_no_new_privs"
|
|
|
|
|
|
|
|
# The Nix build sandbox has seccomp already enabled
|
|
|
|
"test_seccomp"
|
|
|
|
|
|
|
|
# This will fail if prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_FORCE_DISABLE)
|
|
|
|
# has been set system-wide, even outside the sandbox
|
|
|
|
"test_speculation_ctrl"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Python(ic) interface to the linux prctl syscall";
|
|
|
|
homepage = "https://github.com/seveas/python-prctl";
|
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ catern ];
|
|
|
|
};
|
|
|
|
}
|