about summary refs log tree commit diff
path: root/pkgs/development/python-modules/keyutils/default.nix
blob: e9b09ba1e0eceb88685f96d9a6d00bf1ace26082 (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  lib,
  buildPythonPackage,
  cython,
  fetchFromGitHub,
  keyutils,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "keyutils";
  version = "0.6";
  format = "setuptools";

  # github version comes bundled with tests
  src = fetchFromGitHub {
    owner = "sassoftware";
    repo = "python-keyutils";
    rev = version;
    sha256 = "0pfqfr5xqgsqkxzrmj8xl2glyl4nbq0irs0k6ik7iy3gd3mxf5g1";
  };

  postPatch = ''
    substituteInPlace setup.py --replace '"pytest-runner"' ""
  '';

  preBuild = ''
    cython keyutils/_keyutils.pyx
  '';

  preCheck = ''
    rm -rf keyutils
  '';

  buildInputs = [ keyutils ];
  nativeBuildInputs = [ cython ];
  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    description = "Set of python bindings for keyutils";
    homepage = "https://github.com/sassoftware/python-keyutils";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ primeos ];
  };
}