1{ lib
2, buildPythonPackage
3, cython
4, fetchFromGitHub
5, keyutils
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "keyutils";
11 version = "0.6";
12
13 # github version comes bundled with tests
14 src = fetchFromGitHub {
15 owner = "sassoftware";
16 repo = "python-keyutils";
17 rev = version;
18 sha256 = "0pfqfr5xqgsqkxzrmj8xl2glyl4nbq0irs0k6ik7iy3gd3mxf5g1";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py --replace '"pytest-runner"' ""
23 '';
24
25 preBuild = ''
26 cython keyutils/_keyutils.pyx
27 '';
28
29 preCheck = ''
30 rm -rf keyutils
31 '';
32
33 buildInputs = [ keyutils ];
34 nativeBuildInputs = [ cython ];
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38
39 meta = {
40 description = "A set of python bindings for keyutils";
41 homepage = "https://github.com/sassoftware/python-keyutils";
42 license = lib.licenses.asl20;
43 maintainers = with lib.maintainers; [ primeos ];
44 };
45}