1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, hypothesis
5, poetry-core
6, pytestCheckHook
7, pythonOlder
8, pythonAtLeast
9}:
10
11buildPythonPackage rec {
12 pname = "collections-extended";
13 version = "2.0.2";
14 format = "pyproject";
15
16 # https://github.com/mlenzen/collections-extended/issues/198
17 disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
18
19 src = fetchFromGitHub {
20 owner = "mlenzen";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-cK13+CQUELKSiLpG747+C+RB5b6luu0mWLLXTT+uGH4=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 nativeCheckInputs = [
31 hypothesis
32 pytestCheckHook
33 ];
34
35 pythonImportsCheck = [
36 "collections_extended"
37 ];
38
39 meta = with lib; {
40 description = "Extra Python Collections - bags (multisets), setlists (unique list/indexed set), RangeMap and IndexedDict";
41 homepage = "https://github.com/mlenzen/collections-extended";
42 license = licenses.asl20;
43 maintainers = with maintainers; [ exarkun ];
44 };
45}