9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
43 lines
925 B
Nix
43 lines
925 B
Nix
{ 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 ];
|
|
};
|
|
}
|