Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 name = "do-not-include-gtest-src-dir.patch"; 25 url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch?id=9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909"; 26 hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4="; 27 }) 28 ]; 29 # valgrind_unittest failed 30 cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_CTEST_ARGUMENTS=-E;valgrind_unittest" ]; 31 }); 32in buildPythonPackage rec { 33 version = "1.9"; 34 pname = "python-rapidjson"; 35 disabled = pythonOlder "3.7"; 36 37 src = fetchPypi { 38 inherit pname version; 39 hash = "sha256-vn01HHES2sYIEzoj9g6VOVZo0JgaB/QDf2Pg6Ir88Bo="; 40 }; 41 42 setupPyBuildFlags = [ 43 "--rj-include-dir=${lib.getDev rapidjson'}/include" 44 ]; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 pytz 49 ]; 50 51 disabledTestPaths = [ 52 "benchmarks" 53 ]; 54 55 meta = with lib; { 56 homepage = "https://github.com/python-rapidjson/python-rapidjson"; 57 description = "Python wrapper around rapidjson"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ costrouc dotlambda ]; 60 }; 61}