2021-12-19 10:58:12 +00:00
|
|
|
{ lib
|
2023-01-04 16:11:40 +00:00
|
|
|
, beautifulsoup4
|
2021-12-19 10:58:12 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, matplotlib
|
2023-02-19 17:42:00 +00:00
|
|
|
, pygithub
|
2021-12-19 10:58:12 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ghrepo-stats";
|
2023-03-15 11:37:52 +00:00
|
|
|
version = "0.5.4";
|
2021-12-19 10:58:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mrbean-bremen";
|
|
|
|
repo = pname;
|
2023-01-31 15:57:34 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 11:37:52 +00:00
|
|
|
hash = "sha256-Mr0FM2CbdgAUF8siMjUIZvypWiPNPU9OncPiBPqK3uE=";
|
2021-12-19 10:58:12 +00:00
|
|
|
};
|
|
|
|
|
2023-01-04 16:11:40 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/mrbean-bremen/ghrepo-stats/pull/1
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "bs4" "beautifulsoup4"
|
|
|
|
'';
|
|
|
|
|
2021-12-19 10:58:12 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-01-04 16:11:40 +00:00
|
|
|
beautifulsoup4
|
2021-12-19 10:58:12 +00:00
|
|
|
matplotlib
|
2023-02-19 17:42:00 +00:00
|
|
|
pygithub
|
2021-12-19 10:58:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Module has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ghrepo_stats"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module and CLI tool for GitHub repo statistics";
|
|
|
|
homepage = "https://github.com/mrbean-bremen/ghrepo-stats";
|
2022-12-27 21:13:14 +00:00
|
|
|
changelog = "https://github.com/mrbean-bremen/ghrepo-stats/blob/v${version}/CHANGES.md";
|
2021-12-19 10:58:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|