1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 rapidjson, 6 pytestCheckHook, 7 pytz, 8 setuptools, 9 replaceVars, 10}: 11 12buildPythonPackage rec { 13 version = "1.21"; 14 pname = "python-rapidjson"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "python-rapidjson"; 19 repo = "python-rapidjson"; 20 tag = "v${version}"; 21 hash = "sha256-qpq7gNdWDSNTVTqV1rnRffap0VrlHOr4soAY/SXqd1k="; 22 }; 23 24 patches = [ 25 (replaceVars ./rapidjson-include-dir.patch { 26 rapidjson = lib.getDev rapidjson; 27 }) 28 ]; 29 30 build-system = [ setuptools ]; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 pytz 35 ]; 36 37 disabledTestPaths = [ "benchmarks" ]; 38 39 meta = { 40 changelog = "https://github.com/python-rapidjson/python-rapidjson/blob/${src.tag}/CHANGES.rst"; 41 homepage = "https://github.com/python-rapidjson/python-rapidjson"; 42 description = "Python wrapper around rapidjson"; 43 license = lib.licenses.mit; 44 maintainers = with lib.maintainers; [ dotlambda ]; 45 }; 46}