about summary refs log tree commit diff
path: root/pkgs/development/python-modules/crossandra/default.nix
blob: c7400b62f53ac622b8544c206562f7b5019784c5 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  result,
  mypy
}:

buildPythonPackage rec {
  pname = "crossandra";
  version = "2.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "trag1c";
    repo = "crossandra";
    rev = "refs/tags/${version}";
    hash = "sha256-/JhrjXRH7Rs2bUil9HRneBC9wlVYEyfwivjzb+eyRv8=";
  };

  build-system = [ setuptools mypy ];
  dependencies = [ result ];

  pythonImportsCheck = [ "crossandra" ];
  prePatch = ''
    # pythonRelaxDepsHook did not work
    substituteInPlace pyproject.toml \
      --replace-fail "result ~= 0.9.0" "result >= 0.9.0"
  '';

  meta = {
    changelog = "https://github.com/trag1c/crossandra/blob/${src.rev}/CHANGELOG.md";
    description = "Fast and simple enum/regex-based tokenizer with decent configurability";
    license = lib.licenses.mit;
    homepage = "https://trag1c.github.io/crossandra";
    maintainers = with lib.maintainers; [ sigmanificient ];
  };
}