1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 frozendict,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9 simplejson,
10}:
11
12buildPythonPackage rec {
13 pname = "canonicaljson";
14 version = "2.0.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-4v2u8df63F2ctZvT0NQbBk3dppeAmsQyXc7XIdEvET8=";
22 };
23
24 nativeBuildInputs = [ setuptools ];
25
26 propagatedBuildInputs = [ simplejson ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 pythonImportsCheck = [ "canonicaljson" ];
31
32 meta = with lib; {
33 description = "Encodes objects and arrays as RFC 7159 JSON";
34 homepage = "https://github.com/matrix-org/python-canonicaljson";
35 changelog = "https://github.com/matrix-org/python-canonicaljson/blob/v${version}/CHANGES.md";
36 license = licenses.asl20;
37 maintainers = with maintainers; [ fab ];
38 };
39}