mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-12-05 12:19:57 +00:00
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchpatch2,
|
|
buildPythonPackage,
|
|
pytest7CheckHook,
|
|
numpy,
|
|
pandas,
|
|
pytz,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "json-tricks";
|
|
version = "3.17.3";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mverleg";
|
|
repo = "pyjson_tricks";
|
|
tag = "v${version}";
|
|
hash = "sha256-xddMc4PvVI+mqB3eeVqECZmdeSKAURsdbOnUAXahqM0=";
|
|
};
|
|
|
|
patches = [
|
|
# pandas 3 support, merged upstream but not yet released
|
|
# https://github.com/mverleg/pyjson_tricks/pull/113
|
|
(fetchpatch2 {
|
|
name = "pandas-3-support.patch";
|
|
url = "https://github.com/mverleg/pyjson_tricks/commit/490d557aadb459b931eb334298834b051cb592de.patch?full_index=1";
|
|
hash = "sha256-tAIHz+bNSD9FFLr3JbNqk1aI2wrPC21+Q7yG+XvTmaI=";
|
|
})
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
numpy
|
|
pandas
|
|
pytz
|
|
pytest7CheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "json_tricks" ];
|
|
|
|
meta = {
|
|
description = "Extra features for Python JSON handling";
|
|
homepage = "https://github.com/mverleg/pyjson_tricks";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ bcdarwin ];
|
|
};
|
|
}
|