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