aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/seccomp/default.nix
blob: 3257722b1782333f22ee52a0fda6c03008516cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 ];
  };
}