2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, frozendict
|
|
|
|
, pytestCheckHook
|
2021-10-28 06:52:43 +00:00
|
|
|
, pythonOlder
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2021-10-28 06:52:43 +00:00
|
|
|
, simplejson
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "canonicaljson";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "1.6.4";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-04 12:27:35 +00:00
|
|
|
hash = "sha256-bAmyEZUR8w6xEmz82XOhCCTiDxz9JQOc3j0SGN2cjY8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
simplejson
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
frozendict = [
|
|
|
|
frozendict
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-28 06:52:43 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_frozen_dict"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"canonicaljson"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-10-28 06:52:43 +00:00
|
|
|
description = "Encodes objects and arrays as RFC 7159 JSON";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/matrix-org/python-canonicaljson";
|
|
|
|
license = licenses.asl20;
|
2021-10-28 06:52:43 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|