Files
nixpkgs/pkgs/development/python-modules/glom/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

79 lines
1.6 KiB
Nix

{
lib,
attrs,
boltons,
buildPythonPackage,
face,
fetchPypi,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
pyyaml,
setuptools,
tomli,
}:
buildPythonPackage rec {
pname = "glom";
version = "24.11.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-QyX5Z1mpEgRK97bGvQ26RK2MHrYDiqsFcylmHSAhuyc=";
};
build-system = [ setuptools ];
dependencies = [
boltons
attrs
face
];
optional-dependencies = {
toml = lib.optionals (pythonOlder "3.11") [ tomli ];
yaml = [ pyyaml ];
};
nativeCheckInputs = [
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
preCheck = ''
# test_cli.py checks the output of running "glom"
export PATH=$out/bin:$PATH
'';
disabledTests = lib.optionals (pythonAtLeast "3.11") [
"test_regular_error_stack"
"test_long_target_repr"
"test_glom_error_stack"
"test_glom_error_double_stack"
"test_branching_stack"
"test_midway_branch"
"test_partially_failing_branch"
"test_coalesce_stack"
"test_nesting_stack"
"test_3_11_byte_code_caret"
];
pythonImportsCheck = [ "glom" ];
meta = {
description = "Module for restructuring data";
longDescription = ''
glom helps pull together objects from other objects in a
declarative, dynamic, and downright simple way.
'';
homepage = "https://github.com/mahmoud/glom";
changelog = "https://github.com/mahmoud/glom/blob/v${version}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ twey ];
mainProgram = "glom";
};
}