1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, mypy
7, typing-extensions
8}:
9
10buildPythonPackage rec {
11 pname = "immutables";
12 version = "0.19";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "MagicStack";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-yW+pmAryBp6bvjolN91ACDkk5zxvKfu4nRLQSy71kqs=";
22 };
23
24 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
25 typing-extensions
26 ];
27
28 nativeCheckInputs = [
29 mypy
30 pytestCheckHook
31 ];
32
33 disabledTests = [
34 # Version mismatch
35 "testMypyImmu"
36 ];
37
38 pythonImportsCheck = [
39 "immutables"
40 ];
41
42 meta = with lib; {
43 description = "An immutable mapping type";
44 homepage = "https://github.com/MagicStack/immutables";
45 license = with licenses; [ asl20 ];
46 maintainers = with maintainers; [ catern ];
47 };
48}