forked from mirrors/nixpkgs
python3Packages.orjson: init at 3.6.3 (#137969)
Co-authored-by: Jonathan Ringer <jonringer@users.noreply.github.com> Co-authored-by: figsoda <figsoda@pm.me>
This commit is contained in:
parent
9358f9a954
commit
556dcbe51d
61
pkgs/development/python-modules/orjson/default.nix
Normal file
61
pkgs/development/python-modules/orjson/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, pythonOlder
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, libiconv
|
||||
, numpy
|
||||
, psutil
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pytz
|
||||
, xxhash
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "orjson";
|
||||
version = "3.6.3";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ijl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "10clf13bp3fqd9b7n1isrfwz7sngcl1j6birqc1xyg9wzfw1kslj";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
sha256 = "163rf8k7qb1whjf78i8v5dlyif1sgvd9xkj8li81j45abgzkq86w";
|
||||
};
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
nativeBuildInputs = with rustPlatform; [
|
||||
cargoSetupHook
|
||||
maturinBuildHook
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
checkInputs = [
|
||||
numpy
|
||||
psutil
|
||||
pytestCheckHook
|
||||
python-dateutil
|
||||
pytz
|
||||
xxhash
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ pname ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy";
|
||||
homepage = "https://github.com/ijl/orjson";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ misuzu ];
|
||||
};
|
||||
}
|
|
@ -5162,6 +5162,8 @@ in {
|
|||
|
||||
orderedset = callPackage ../development/python-modules/orderedset { };
|
||||
|
||||
orjson = callPackage ../development/python-modules/orjson { };
|
||||
|
||||
orm = callPackage ../development/python-modules/orm { };
|
||||
|
||||
ortools = (toPythonModule (pkgs.or-tools.override { inherit (self) python; })).python;
|
||||
|
|
Loading…
Reference in a new issue