1{
2 buildPythonPackage,
3 lib,
4 cython,
5 libseccomp,
6}:
7
8buildPythonPackage rec {
9 pname = "libseccomp";
10 version = libseccomp.version;
11 format = "setuptools";
12 src = libseccomp.pythonsrc;
13
14 VERSION_RELEASE = version; # used by build system
15
16 nativeBuildInputs = [ cython ];
17 buildInputs = [ libseccomp ];
18
19 unpackCmd = "tar xf $curSrc";
20 doInstallCheck = true;
21
22 postPatch = ''
23 substituteInPlace ./setup.py \
24 --replace 'extra_objects=["../.libs/libseccomp.a"]' \
25 'libraries=["seccomp"]'
26 '';
27
28 pythonImportsCheck = [ "seccomp" ];
29
30 meta = with lib; {
31 description = "Python bindings for libseccomp";
32 license = with licenses; [ lgpl21 ];
33 maintainers = with maintainers; [ thoughtpolice ];
34 };
35}