1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6}:
7
8buildPythonPackage rec {
9 pname = "immutables";
10 version = "0.20";
11 format = "setuptools";
12
13 disabled = pythonOlder "3.8";
14
15 src = fetchFromGitHub {
16 owner = "MagicStack";
17 repo = pname;
18 rev = "refs/tags/v${version}";
19 hash = "sha256-fEECtP6WQVzwSzBYX+CbhQtzkB/1WC3OYKXk2XY//xA=";
20 };
21
22 postPatch = ''
23 rm tests/conftest.py
24 '';
25
26 nativeCheckInputs = [
27 pytestCheckHook
28 ];
29
30 disabledTests = [
31 # Version mismatch
32 "testMypyImmu"
33 ];
34
35 disabledTestPaths = [
36 # avoid dependency on mypy
37 "tests/test_mypy.py"
38 ];
39
40 pythonImportsCheck = [
41 "immutables"
42 ];
43
44 meta = with lib; {
45 description = "An immutable mapping type";
46 homepage = "https://github.com/MagicStack/immutables";
47 changelog = "https://github.com/MagicStack/immutables/releases/tag/v${version}";
48 license = with licenses; [ asl20 ];
49 maintainers = with maintainers; [ catern ];
50 };
51}