77 lines
1.3 KiB
Nix
77 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
cargo,
|
|
rustPlatform,
|
|
rustc,
|
|
pyinstaller,
|
|
|
|
# dependencies
|
|
msgpack,
|
|
|
|
# testing
|
|
pydantic,
|
|
pytestCheckHook,
|
|
python-dateutil,
|
|
pytz,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ormsgpack";
|
|
version = "1.11.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aviramha";
|
|
repo = "ormsgpack";
|
|
tag = version;
|
|
hash = "sha256-fEmAKo68BRHAsYkLp+aYVMG97fdb7YaApKTo0w9Nfzc=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit src;
|
|
hash = "sha256-RpfrR9dkdaaPCMt6vUuJjSSaEv6zH/UjbKfaavV8Ypg=";
|
|
};
|
|
|
|
build-system = [
|
|
cargo
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
rustc
|
|
];
|
|
|
|
# requires nightly features (feature(portable_simd))
|
|
env.RUSTC_BOOTSTRAP = true;
|
|
|
|
dependencies = [
|
|
msgpack
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pyinstaller
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pydantic
|
|
python-dateutil
|
|
pytz
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"ormsgpack"
|
|
];
|
|
|
|
meta = {
|
|
description = "Fast msgpack serialization library for Python derived from orjson";
|
|
homepage = "https://github.com/aviramha/ormsgpack";
|
|
changelog = "https://github.com/aviramha/ormsgpack/releases/tag/${version}";
|
|
license = with lib.licenses; [
|
|
asl20
|
|
mit
|
|
];
|
|
maintainers = with lib.maintainers; [ sarahec ];
|
|
};
|
|
}
|