2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
typish,
|
|
|
|
tzdata,
|
2022-09-11 15:47:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jsons";
|
|
|
|
version = "1.6.3";
|
2023-02-22 10:55:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ramonhagenaars";
|
|
|
|
repo = "jsons";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-7OIByHvsqhKFOkb1q2kuxmbkkleryavYgp/T4U5hvGk=";
|
2022-09-11 15:47:08 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ typish ];
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-11 15:47:08 +00:00
|
|
|
attrs
|
|
|
|
pytestCheckHook
|
|
|
|
tzdata
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# These tests are based on timings, which fail
|
|
|
|
# on slow or overloaded machines.
|
|
|
|
"tests/test_performance.py"
|
|
|
|
];
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
# https://github.com/ramonhagenaars/jsons/issues/187
|
|
|
|
"test_dump_load_parameterized_collections"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "jsons" ];
|
2022-09-11 15:47:08 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Turn Python objects into dicts or json strings and back";
|
|
|
|
homepage = "https://github.com/ramonhagenaars/jsons";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/ramonhagenaars/jsons/releases/tag/v${version}";
|
2022-09-11 15:47:08 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fmoda3 ];
|
|
|
|
};
|
|
|
|
}
|