1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 packaging,
6 pytestCheckHook,
7 pythonOlder,
8 requests,
9}:
10
11buildPythonPackage rec {
12 pname = "anybadge";
13 version = "1.14.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "jongracecox";
20 repo = pname;
21 rev = "refs/tags/v${version}";
22 hash = "sha256-+CkkFCShCYtxKiCWRQcgTFcekc/g7ujQj9MdnG1+a0A=";
23 };
24
25 # setup.py reads its version from the TRAVIS_TAG environment variable
26 TRAVIS_TAG = "v${version}";
27
28 propagatedBuildInputs = [ packaging ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 requests
33 ];
34
35 disabledTests = [
36 # Comparison of CLI output fails
37 "test_module_same_output_as_main_cli"
38 ];
39
40 disabledTestPaths = [
41 # No anybadge-server
42 "tests/test_server.py"
43 ];
44
45 pythonImportsCheck = [ "anybadge" ];
46
47 meta = with lib; {
48 description = "Python tool for generating badges for your projects";
49 homepage = "https://github.com/jongracecox/anybadge";
50 changelog = "https://github.com/jongracecox/anybadge/releases/tag/v${version}";
51 license = licenses.mit;
52 maintainers = with maintainers; [ fabiangd ];
53 };
54}