1{ lib
2, beautifulsoup4
3, buildPythonPackage
4, fetchFromGitHub
5, matplotlib
6, pygithub
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "ghrepo-stats";
12 version = "0.5.4";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "mrbean-bremen";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-Mr0FM2CbdgAUF8siMjUIZvypWiPNPU9OncPiBPqK3uE=";
22 };
23
24 postPatch = ''
25 # https://github.com/mrbean-bremen/ghrepo-stats/pull/1
26 substituteInPlace setup.py \
27 --replace "bs4" "beautifulsoup4"
28 '';
29
30 propagatedBuildInputs = [
31 beautifulsoup4
32 matplotlib
33 pygithub
34 ];
35
36 # Module has no tests
37 doCheck = false;
38
39 pythonImportsCheck = [
40 "ghrepo_stats"
41 ];
42
43 meta = with lib; {
44 description = "Python module and CLI tool for GitHub repo statistics";
45 homepage = "https://github.com/mrbean-bremen/ghrepo-stats";
46 changelog = "https://github.com/mrbean-bremen/ghrepo-stats/blob/v${version}/CHANGES.md";
47 license = licenses.mit;
48 maintainers = with maintainers; [ fab ];
49 };
50}