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