Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / nbtlib / default.nix
blob3ec7ade6a90b42d24906f13e380df14ffda70858
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , poetry-core
5 , numpy
6 }:
8 buildPythonPackage rec {
9   pname = "nbtlib";
10   version = "2.0.4";
11   format = "pyproject";
13   src = fetchFromGitHub {
14     owner = "vberlier";
15     repo = "nbtlib";
16     rev = "v${version}";
17     hash = "sha256-L8eX6/0qiQ4UxbmDicLedzj+oBjYmlK96NpljE/A3eI=";
18   };
20   prePatch = ''
21       substituteInPlace pyproject.toml \
22       --replace "poetry>=0.12" "poetry-core" \
23       --replace "poetry.masonry" "poetry.core.masonry"
24   '';
26   nativeBuildInputs = [
27     poetry-core
28   ];
30   propagatedBuildInputs = [
31     numpy
32   ];
34   pythonImportsCheck = [ "nbtlib" ];
36   meta = with lib; {
37     description = "A python library to read and edit nbt data";
38     mainProgram = "nbt";
39     homepage = "https://github.com/vberlier/nbtlib";
40     changelog = "https://github.com/vberlier/nbtlib/blob/${src.rev}/CHANGELOG.md";
41     license = licenses.mit;
42     maintainers = with maintainers; [ gdd ];
43   };