diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/immutabledict/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/immutabledict/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/immutabledict/default.nix b/nixpkgs/pkgs/development/python-modules/immutabledict/default.nix new file mode 100644 index 000000000000..54fef8720ca5 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/immutabledict/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "immutabledict"; + version = "2.1.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "corenting"; + repo = "immutabledict"; + rev = "v${version}"; + sha256 = "1n71154nfb6vr41iv00xcwkxmwnn1vwzbr3s23bjvlhvmnjb48a8"; + }; + + # https://github.com/corenting/immutabledict/issues/56 + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + pythonImportsCheck = [ + "immutabledict" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "A fork of frozendict, an immutable wrapper around dictionaries"; + homepage = "https://github.com/corenting/immutabledict"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} + |