1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, pythonOlder 6, rapidjson 7, pytestCheckHook 8, pytz 9, glibcLocales 10}: 11 12let 13 rapidjson' = rapidjson.overrideAttrs (old: { 14 version = "unstable-2023-03-06"; 15 src = fetchFromGitHub { 16 owner = "Tencent"; 17 repo = "rapidjson"; 18 rev = "5e17dbed34eef33af8f3e734820b5dc547a2a3aa"; 19 hash = "sha256-CTy42X6P6+Gz4WbJ3tCpAw3qqlJ+mU1PaWW9LGG+6nU="; 20 }; 21 patches = [ 22 (fetchpatch { 23 name = "do-not-include-gtest-src-dir.patch"; 24 url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch?id=9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909"; 25 hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4="; 26 }) 27 ]; 28 # valgrind_unittest failed 29 cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_CTEST_ARGUMENTS=-E;valgrind_unittest" ]; 30 }); 31in buildPythonPackage rec { 32 version = "1.11"; 33 pname = "python-rapidjson"; 34 disabled = pythonOlder "3.7"; 35 36 format = "setuptools"; 37 38 src = fetchFromGitHub { 39 owner = "python-rapidjson"; 40 repo = "python-rapidjson"; 41 rev = "refs/tags/v${version}"; 42 hash = "sha256-Jnnr4MCopx2YJTqbHqSCzPBzUl0T8SqcznRGSI14d2Q="; 43 }; 44 45 setupPyBuildFlags = [ 46 "--rj-include-dir=${lib.getDev rapidjson'}/include" 47 ]; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 pytz 52 ]; 53 54 disabledTestPaths = [ 55 "benchmarks" 56 ]; 57 58 meta = with lib; { 59 changelog = "https://github.com/python-rapidjson/python-rapidjson/blob/${src.rev}/CHANGES.rst"; 60 homepage = "https://github.com/python-rapidjson/python-rapidjson"; 61 description = "Python wrapper around rapidjson"; 62 license = licenses.mit; 63 maintainers = with maintainers; [ dotlambda ]; 64 }; 65}