2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2022-06-16 17:23:12 +00:00
|
|
|
, rapidjson
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
|
|
|
, glibcLocales
|
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
let
|
|
|
|
rapidjson' = rapidjson.overrideAttrs (old: {
|
|
|
|
version = "unstable-2022-05-24";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tencent";
|
|
|
|
repo = "rapidjson";
|
|
|
|
rev = "232389d4f1012dddec4ef84861face2d2ba85709";
|
|
|
|
hash = "sha256-RLvDcInUa8E8DRA4U/oXEE8+TZ0SDXXDU/oWvpfDWjw=";
|
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch";
|
|
|
|
hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python-rapidjson";
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-vn01HHES2sYIEzoj9g6VOVZo0JgaB/QDf2Pg6Ir88Bo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
setupPyBuildFlags = [
|
|
|
|
"--rj-include-dir=${lib.getDev rapidjson'}/include"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytz
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"benchmarks"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/python-rapidjson/python-rapidjson";
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Python wrapper around rapidjson";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ costrouc dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|