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