blob: 224fbbd204003a9fe0bd0a901f6b729cc558a37a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "constantdict";
version = "2025.3";
pyproject = true;
src = fetchFromGitHub {
owner = "matthiasdiener";
repo = "constantdict";
tag = "v${finalAttrs.version}";
hash = "sha256-jX6g9xBteZOc/7Ob5N8eUSCycb6JoE5i38T52zknOTI=";
};
build-system = [
hatchling
];
pythonImportsCheck = [
"constantdict"
];
# Assumes that unpickling a pickled dict in a different Python process will result in a different hash.
# This doesn't seem to work in the Nix sandbox but works fine in a normal environment.
disabledTests = [
"test_pickle_hash"
];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
homepage = "https://matthiasdiener.github.io/constantdict";
downloadPage = "https://github.com/matthiasdiener/constantdict";
description = "Immutable dictionary class for Python, implemented as a thin layer around Python's builtin dict class";
changelog = "https://github.com/matthiasdiener/constantdict/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ qbisi ];
};
})
|