python3Packages.nbtlib: init at 2.0.4

This commit is contained in:
gabriel-doriath-dohler 2023-06-30 23:59:59 +00:00
parent 9c54651749
commit 3afa21632f
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,43 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, numpy
}:
buildPythonPackage rec {
pname = "nbtlib";
version = "2.0.4";
format = "pyproject";
src = fetchFromGitHub {
owner = "vberlier";
repo = "nbtlib";
rev = "v${version}";
hash = "sha256-L8eX6/0qiQ4UxbmDicLedzj+oBjYmlK96NpljE/A3eI=";
};
prePatch = ''
substituteInPlace pyproject.toml \
--replace "poetry>=0.12" "poetry-core" \
--replace "poetry.masonry" "poetry.core.masonry"
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
numpy
];
pythonImportsCheck = [ "nbtlib" ];
meta = with lib; {
description = "A python library to read and edit nbt data";
homepage = "https://github.com/vberlier/nbtlib";
changelog = "https://github.com/vberlier/nbtlib/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ gdd ];
};
}

View File

@ -6724,6 +6724,8 @@ self: super: with self; {
nbsphinx = callPackage ../development/python-modules/nbsphinx { };
nbtlib = callPackage ../development/python-modules/nbtlib { };
nbval = callPackage ../development/python-modules/nbval { };
nbxmpp = callPackage ../development/python-modules/nbxmpp { };