nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 attrs,
4 boltons,
5 buildPythonPackage,
6 face,
7 fetchPypi,
8 pytestCheckHook,
9 pythonAtLeast,
10 pythonOlder,
11 pyyaml,
12 setuptools,
13 tomli,
14}:
15
16buildPythonPackage rec {
17 pname = "glom";
18 version = "25.12.0";
19 pyproject = true;
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-GufaiL42k99ArSe99Xp2WlXAdchslxvN3WeSdAPrAGk=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 boltons
30 attrs
31 face
32 ];
33
34 optional-dependencies = {
35 toml = lib.optionals (pythonOlder "3.11") [ tomli ];
36 yaml = [ pyyaml ];
37 };
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 ]
42 ++ lib.concatAttrValues optional-dependencies;
43
44 preCheck = ''
45 # test_cli.py checks the output of running "glom"
46 export PATH=$out/bin:$PATH
47 '';
48
49 disabledTests = lib.optionals (pythonAtLeast "3.11") [
50 "test_regular_error_stack"
51 "test_long_target_repr"
52 "test_glom_error_stack"
53 "test_glom_error_double_stack"
54 "test_branching_stack"
55 "test_midway_branch"
56 "test_partially_failing_branch"
57 "test_coalesce_stack"
58 "test_nesting_stack"
59 "test_3_11_byte_code_caret"
60 ];
61
62 pythonImportsCheck = [ "glom" ];
63
64 meta = {
65 description = "Module for restructuring data";
66 longDescription = ''
67 glom helps pull together objects from other objects in a
68 declarative, dynamic, and downright simple way.
69 '';
70 homepage = "https://github.com/mahmoud/glom";
71 changelog = "https://github.com/mahmoud/glom/blob/v${version}/CHANGELOG.md";
72 license = lib.licenses.bsd3;
73 maintainers = with lib.maintainers; [ twey ];
74 mainProgram = "glom";
75 };
76}