diff --git a/pkgs/development/python-modules/ghrepo-stats/default.nix b/pkgs/development/python-modules/ghrepo-stats/default.nix index ee83ba4a47d6..66600c873038 100644 --- a/pkgs/development/python-modules/ghrepo-stats/default.nix +++ b/pkgs/development/python-modules/ghrepo-stats/default.nix @@ -5,27 +5,24 @@ fetchFromGitHub, matplotlib, pygithub, + setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "ghrepo-stats"; version = "0.5.5"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "mrbean-bremen"; repo = "ghrepo-stats"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-zdBIX/uetkOAalg4uJPWXRL9WUgNN+hmqUwQDTdzrzA="; }; - postPatch = '' - # https://github.com/mrbean-bremen/ghrepo-stats/pull/1 - substituteInPlace setup.py \ - --replace "bs4" "beautifulsoup4" - ''; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ beautifulsoup4 matplotlib pygithub @@ -38,10 +35,10 @@ buildPythonPackage rec { meta = { description = "Python module and CLI tool for GitHub repo statistics"; - mainProgram = "show-ghstats"; homepage = "https://github.com/mrbean-bremen/ghrepo-stats"; - changelog = "https://github.com/mrbean-bremen/ghrepo-stats/blob/v${version}/CHANGES.md"; + changelog = "https://github.com/mrbean-bremen/ghrepo-stats/blob/${finalAttrs.src.tag}/CHANGES.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; + mainProgram = "show-ghstats"; }; -} +})