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>

authored by misuzu.tngl.sh

Jonathan Ringer
figsoda
and committed by
GitHub
556dcbe5 9358f9a9

+63
+61
pkgs/development/python-modules/orjson/default.nix
··· 1 + { lib 2 + , stdenv 3 + , pythonOlder 4 + , rustPlatform 5 + , fetchFromGitHub 6 + , buildPythonPackage 7 + , libiconv 8 + , numpy 9 + , psutil 10 + , pytestCheckHook 11 + , python-dateutil 12 + , pytz 13 + , xxhash 14 + }: 15 + 16 + buildPythonPackage rec { 17 + pname = "orjson"; 18 + version = "3.6.3"; 19 + disabled = pythonOlder "3.7"; 20 + 21 + src = fetchFromGitHub { 22 + owner = "ijl"; 23 + repo = pname; 24 + rev = version; 25 + sha256 = "10clf13bp3fqd9b7n1isrfwz7sngcl1j6birqc1xyg9wzfw1kslj"; 26 + }; 27 + 28 + cargoDeps = rustPlatform.fetchCargoTarball { 29 + inherit src; 30 + name = "${pname}-${version}"; 31 + sha256 = "163rf8k7qb1whjf78i8v5dlyif1sgvd9xkj8li81j45abgzkq86w"; 32 + }; 33 + 34 + format = "pyproject"; 35 + 36 + nativeBuildInputs = with rustPlatform; [ 37 + cargoSetupHook 38 + maturinBuildHook 39 + ]; 40 + 41 + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 42 + 43 + checkInputs = [ 44 + numpy 45 + psutil 46 + pytestCheckHook 47 + python-dateutil 48 + pytz 49 + xxhash 50 + ]; 51 + 52 + pythonImportsCheck = [ pname ]; 53 + 54 + meta = with lib; { 55 + description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"; 56 + homepage = "https://github.com/ijl/orjson"; 57 + license = with licenses; [ asl20 mit ]; 58 + platforms = platforms.unix; 59 + maintainers = with maintainers; [ misuzu ]; 60 + }; 61 + }
+2
pkgs/top-level/python-packages.nix
··· 5162 5162 5163 5163 orderedset = callPackage ../development/python-modules/orderedset { }; 5164 5164 5165 + orjson = callPackage ../development/python-modules/orjson { }; 5166 + 5165 5167 orm = callPackage ../development/python-modules/orm { }; 5166 5168 5167 5169 ortools = (toPythonModule (pkgs.or-tools.override { inherit (self) python; })).python;