1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 pythonRelaxDepsHook,
8 setuptools,
9 build,
10 coloredlogs,
11 packaging,
12 pip,
13 readme-renderer,
14 toml,
15 twine,
16}:
17
18buildPythonPackage rec {
19 pname = "bork";
20 version = "8.0.0";
21 pyproject = true;
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "duckinator";
26 repo = pname;
27 rev = "refs/tags/v${version}";
28 hash = "sha256-BDwVhKmZ/F8CvpT6dEI5moQZx8wHy1TwdOl889XogEo=";
29 };
30
31 build-system = [
32 pythonRelaxDepsHook
33 setuptools
34 ];
35
36 pythonRelaxDeps = [
37 "packaging"
38 "readme-renderer"
39 "twine"
40 "wheel"
41 ];
42
43 dependencies = [
44 build
45 coloredlogs
46 packaging
47 pip
48 readme-renderer
49 twine
50 ] ++ lib.optionals (pythonOlder "3.11") [ toml ];
51
52 pythonImportsCheck = [
53 "bork"
54 "bork.api"
55 "bork.cli"
56 ];
57
58 nativeCheckInputs = [ pytestCheckHook ];
59
60 pytestFlagsArray = [ "-m 'not network'" ];
61
62 disabledTests = [
63 # tries to call python -m bork
64 "test_repo"
65 ];
66
67 meta = with lib; {
68 description = "Python build and release management tool";
69 mainProgram = "bork";
70 homepage = "https://github.com/duckinator/bork";
71 maintainers = with maintainers; [ nicoo ];
72 platforms = platforms.all;
73 };
74}