1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 libcap, 6 pytestCheckHook, 7}: 8 9buildPythonPackage rec { 10 pname = "python-prctl"; 11 version = "1.8.1"; 12 format = "setuptools"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "b4ca9a25a7d4f1ace4fffd1f3a2e64ef5208fe05f929f3edd5e27081ca7e67ce"; 17 }; 18 19 buildInputs = [ libcap ]; 20 21 nativeCheckInputs = [ pytestCheckHook ]; 22 23 disabledTests = [ 24 # Intel MPX support was removed in GCC 9.1 & Linux kernel 5.6 25 "test_mpx" 26 27 # The Nix build sandbox has no_new_privs already enabled 28 "test_no_new_privs" 29 30 # The Nix build sandbox has seccomp already enabled 31 "test_seccomp" 32 33 # This will fail if prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_FORCE_DISABLE) 34 # has been set system-wide, even outside the sandbox 35 "test_speculation_ctrl" 36 ]; 37 38 meta = { 39 description = "Python(ic) interface to the linux prctl syscall"; 40 homepage = "https://github.com/seveas/python-prctl"; 41 license = lib.licenses.gpl3; 42 platforms = lib.platforms.linux; 43 maintainers = with lib.maintainers; [ catern ]; 44 }; 45}