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