Merge pull request #240742 from gabriel-doriath-dohler/nbtlib

This commit is contained in:
Ryan Lahfa 2023-06-30 18:29:45 +02:00 committed by GitHub
commit 453a4231ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 85 additions and 0 deletions

View file

@ -5817,6 +5817,12 @@
githubId = 81654;
name = "Damjan Georgievski";
};
gdd = {
email = "gabriel.doriath.dohler@ens.fr";
github = "gabriel-doriath-dohler";
githubId = 40209356;
name = "Gabriel Doriath Döhler";
};
gdinh = {
email = "nix@contact.dinh.ai";
github = "gdinh";

View file

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, nbtlib
}:
buildPythonPackage rec {
pname = "litemapy";
version = "0.7.2b0";
format = "setuptools";
src = fetchFromGitHub {
owner = "SmylerMC";
repo = "litemapy";
rev = "v${version}";
hash = "sha256-VfEo/JLeU17bEkvc8oZYfq19RsHl6QvKv0sGZYQjYhE=";
};
propagatedBuildInputs = [
nbtlib
];
pythonImportsCheck = [ "litemapy" ];
meta = with lib; {
description = "A Python library to read and edit Litematica's schematic file format";
homepage = "https://github.com/SmylerMC/litemapy";
changelog = "https://github.com/SmylerMC/litemapy/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ gdd ];
};
}

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

@ -5894,6 +5894,8 @@ self: super: with self; {
lit = callPackage ../development/python-modules/lit { };
litemapy = callPackage ../development/python-modules/litemapy { };
littleutils = callPackage ../development/python-modules/littleutils { };
livelossplot = callPackage ../development/python-modules/livelossplot { };
@ -6726,6 +6728,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 { };