aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix
new file mode 100644
index 000000000000..3257722b1782
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix
@@ -0,0 +1,29 @@
+{ buildPythonPackage, lib
+, cython, libseccomp
+}:
+
+buildPythonPackage rec {
+ pname = "libseccomp";
+ version = libseccomp.version;
+ src = libseccomp.pythonsrc;
+
+ VERSION_RELEASE = version; # used by build system
+
+ nativeBuildInputs = [ cython ];
+ buildInputs = [ libseccomp ];
+
+ unpackCmd = "tar xf $curSrc";
+ doInstallCheck = true;
+
+ postPatch = ''
+ substituteInPlace ./setup.py \
+ --replace 'extra_objects=["../.libs/libseccomp.a"]' \
+ 'libraries=["seccomp"]'
+ '';
+
+ meta = with lib; {
+ description = "Python bindings for libseccomp";
+ license = with licenses; [ lgpl21 ];
+ maintainers = with maintainers; [ thoughtpolice ];
+ };
+}