2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
attrs,
|
|
|
|
boltons,
|
|
|
|
buildPythonPackage,
|
|
|
|
face,
|
|
|
|
fetchPypi,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glom";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "23.5.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Bq9eNIaqzFk4K6NOU+vqvXqTRdePfby+4m8DuqS4O6w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "face==20.1.1" "face"
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
boltons
|
|
|
|
attrs
|
|
|
|
face
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# test_cli.py checks the output of running "glom"
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Test is outdated (was made for PyYAML 3.x)
|
|
|
|
"test_main_yaml_target"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
"test_regular_error_stack"
|
|
|
|
"test_long_target_repr"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "glom" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Restructuring data, the Python way";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "glom";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
glom helps pull together objects from other objects in a
|
|
|
|
declarative, dynamic, and downright simple way.
|
|
|
|
'';
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://github.com/mahmoud/glom";
|
|
|
|
changelog = "https://github.com/mahmoud/glom/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ twey ];
|
|
|
|
};
|
|
|
|
}
|