1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 result,
7 mypy,
8}:
9
10buildPythonPackage rec {
11 pname = "crossandra";
12 version = "2.2.1";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "trag1c";
17 repo = "crossandra";
18 tag = version;
19 hash = "sha256-/JhrjXRH7Rs2bUil9HRneBC9wlVYEyfwivjzb+eyRv8=";
20 };
21
22 build-system = [
23 setuptools
24 mypy
25 ];
26 dependencies = [ result ];
27
28 pythonImportsCheck = [ "crossandra" ];
29 prePatch = ''
30 # pythonRelaxDepsHook did not work
31 substituteInPlace pyproject.toml \
32 --replace-fail "result ~= 0.9.0" "result >= 0.9.0"
33 '';
34
35 meta = {
36 changelog = "https://github.com/trag1c/crossandra/blob/${src.rev}/CHANGELOG.md";
37 description = "Fast and simple enum/regex-based tokenizer with decent configurability";
38 license = lib.licenses.mit;
39 homepage = "https://trag1c.github.io/crossandra";
40 maintainers = with lib.maintainers; [ sigmanificient ];
41 };
42}