2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
pythonOlder,
|
|
|
|
rapidjson,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytz,
|
|
|
|
setuptools,
|
|
|
|
substituteAll,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
let
|
|
|
|
rapidjson' = rapidjson.overrideAttrs (old: {
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "unstable-2023-03-06";
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tencent";
|
|
|
|
repo = "rapidjson";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "5e17dbed34eef33af8f3e734820b5dc547a2a3aa";
|
|
|
|
hash = "sha256-CTy42X6P6+Gz4WbJ3tCpAw3qqlJ+mU1PaWW9LGG+6nU=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2023-03-15 16:39:30 +00:00
|
|
|
name = "do-not-include-gtest-src-dir.patch";
|
|
|
|
url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch?id=9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
2024-06-05 15:53:02 +00:00
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.18";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python-rapidjson";
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-rapidjson";
|
|
|
|
repo = "python-rapidjson";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-4gJm6EnT6YNg+EkkBPiPQ4TBGG/u+FZTK4bKWyqw1pM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./rapidjson-include-dir.patch;
|
|
|
|
rapidjson = lib.getDev rapidjson';
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytz
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = [ "benchmarks" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/python-rapidjson/python-rapidjson/blob/${src.rev}/CHANGES.rst";
|
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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|