2021-02-16 17:04:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-23 08:02:39 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-16 17:04:54 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-08-23 08:02:39 +00:00
|
|
|
, mypy
|
|
|
|
, typing-extensions
|
2021-02-16 17:04:54 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "immutables";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "0.18";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2021-08-23 08:02:39 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-23 08:02:39 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MagicStack";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-lXCoPTcpTOv9K0xCVjbrP3qlzP9tfk/e3Rk3oOmbS/Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
2021-08-23 08:02:39 +00:00
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mypy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Version mismatch
|
|
|
|
"testMypyImmu"
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"immutables"
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-26 10:26:21 +00:00
|
|
|
description = "An immutable mapping type";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/MagicStack/immutables";
|
2021-02-16 17:04:54 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ catern ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|