nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 callPackage,
5 fetchFromGitHub,
6 pytestCheckHook,
7 pythonOlder,
8
9 setuptools,
10 build,
11 coloredlogs,
12 packaging,
13 pip,
14 toml,
15 urllib3,
16}:
17
18buildPythonPackage rec {
19 pname = "bork";
20 version = "10.0.3";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "duckinator";
25 repo = "bork";
26 tag = "v${version}";
27 hash = "sha256-/euPRR6TRCAAl42CHePfUr+9Kh271iLjTayUR1S/FBg=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 pythonRelaxDeps = [
35 "build"
36 "packaging"
37 "urllib3"
38 ];
39
40 dependencies = [
41 build
42 coloredlogs
43 packaging
44 pip
45 urllib3
46 ]
47 ++ lib.optionals (pythonOlder "3.11") [ toml ];
48
49 pythonImportsCheck = [
50 "bork"
51 "bork.api"
52 "bork.cli"
53 ];
54
55 nativeCheckInputs = [ pytestCheckHook ];
56
57 disabledTestMarks = [ "network" ];
58
59 disabledTests = [
60 # tries to call python -m bork
61 "test_repo"
62 ];
63
64 passthru.tests = callPackage ./tests.nix { };
65
66 meta = {
67 description = "Python build and release management tool";
68 mainProgram = "bork";
69 homepage = "https://github.com/duckinator/bork";
70 license = lib.licenses.mit;
71 maintainers = with lib.maintainers; [ nicoo ];
72 };
73}