Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / nbtlib / default.nix
blobb70259c9c76da65dc950aadd732cd99bd66de28c
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     homepage = "https://github.com/vberlier/nbtlib";
39     changelog = "https://github.com/vberlier/nbtlib/blob/${src.rev}/CHANGELOG.md";
40     license = licenses.mit;
41     maintainers = with maintainers; [ gdd ];
42   };