1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, fetchPypi 6, pythonOlder 7, rapidjson 8, pytestCheckHook 9, pytz 10, glibcLocales 11}: 12 13let 14 rapidjson' = rapidjson.overrideAttrs (old: { 15 version = "unstable-2022-05-24"; 16 src = fetchFromGitHub { 17 owner = "Tencent"; 18 repo = "rapidjson"; 19 rev = "232389d4f1012dddec4ef84861face2d2ba85709"; 20 hash = "sha256-RLvDcInUa8E8DRA4U/oXEE8+TZ0SDXXDU/oWvpfDWjw="; 21 }; 22 patches = [ 23 (fetchpatch { 24 url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch"; 25 hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4="; 26 }) 27 ]; 28 }); 29in buildPythonPackage rec { 30 version = "1.9"; 31 pname = "python-rapidjson"; 32 disabled = pythonOlder "3.7"; 33 34 src = fetchPypi { 35 inherit pname version; 36 hash = "sha256-vn01HHES2sYIEzoj9g6VOVZo0JgaB/QDf2Pg6Ir88Bo="; 37 }; 38 39 setupPyBuildFlags = [ 40 "--rj-include-dir=${lib.getDev rapidjson'}/include" 41 ]; 42 43 checkInputs = [ 44 pytestCheckHook 45 pytz 46 ]; 47 48 disabledTestPaths = [ 49 "benchmarks" 50 ]; 51 52 meta = with lib; { 53 homepage = "https://github.com/python-rapidjson/python-rapidjson"; 54 description = "Python wrapper around rapidjson"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ costrouc dotlambda ]; 57 }; 58}