1{ lib
2, buildPythonPackage
3, fetchPypi
4, frozendict
5, pytestCheckHook
6, pythonOlder
7, setuptools
8, simplejson
9}:
10
11buildPythonPackage rec {
12 pname = "canonicaljson";
13 version = "1.6.4";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-bAmyEZUR8w6xEmz82XOhCCTiDxz9JQOc3j0SGN2cjY8=";
21 };
22
23 nativeBuildInputs = [
24 setuptools
25 ];
26
27 propagatedBuildInputs = [
28 simplejson
29 ];
30
31 passthru.optional-dependencies = {
32 frozendict = [
33 frozendict
34 ];
35 };
36
37 checkInputs = [
38 pytestCheckHook
39 ];
40
41 disabledTests = [
42 "test_frozen_dict"
43 ];
44
45 pythonImportsCheck = [
46 "canonicaljson"
47 ];
48
49 meta = with lib; {
50 description = "Encodes objects and arrays as RFC 7159 JSON";
51 homepage = "https://github.com/matrix-org/python-canonicaljson";
52 license = licenses.asl20;
53 maintainers = with maintainers; [ fab ];
54 };
55}