summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/siphash24/default.nix
blob: 28eddcdf9b9ea3fdcded044a961c2c789b5f640b (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  meson,
  meson-python,
  cython,
  pkg-config,
  c-siphash,
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  version = "1.8";
  pname = "siphash24";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dnicolodi";
    repo = "python-siphash24";
    tag = "v${finalAttrs.version}";
    hash = "sha256-51LgmB30MDTBRoZttIESopWMdrozvLFwlxYELmqu5UQ=";
  };

  nativeBuildInputs = [ pkg-config ];

  build-system = [
    meson
    meson-python
    cython
  ];

  buildInputs = [
    c-siphash
  ];

  pythonImportsCheck = [
    "siphash24"
  ];

  enabledTestPaths = [ "test.py" ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    homepage = "https://github.com/dnicolodi/python-siphash24";
    description = "Streaming-capable SipHash Implementation";
    changelog = "https://github.com/dnicolodi/python-siphash24/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.lgpl2Plus;
    maintainers = with lib.maintainers; [ qbisi ];
  };
})