2023-10-30 23:09:06 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-08-08 14:28:17 +00:00
|
|
|
callPackage,
|
2023-10-30 23:09:06 +00:00
|
|
|
fetchFromGitHub,
|
2023-11-17 11:20:21 +00:00
|
|
|
pytestCheckHook,
|
2023-10-30 23:09:06 +00:00
|
|
|
pythonOlder,
|
2024-08-01 15:34:53 +00:00
|
|
|
|
2024-03-17 21:55:43 +00:00
|
|
|
setuptools,
|
2023-10-30 23:09:06 +00:00
|
|
|
build,
|
|
|
|
coloredlogs,
|
2024-08-01 15:34:53 +00:00
|
|
|
importlib-metadata,
|
2023-10-30 23:09:06 +00:00
|
|
|
packaging,
|
2023-11-09 13:06:41 +00:00
|
|
|
pip,
|
2023-10-30 23:09:06 +00:00
|
|
|
toml,
|
2024-08-01 15:34:53 +00:00
|
|
|
urllib3,
|
2023-10-30 23:09:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bork";
|
2024-08-01 15:34:53 +00:00
|
|
|
version = "9.0.0";
|
2023-10-30 23:09:06 +00:00
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "duckinator";
|
|
|
|
repo = pname;
|
2024-03-08 01:39:22 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-08-01 15:34:53 +00:00
|
|
|
hash = "sha256-YqvtOwd00TXD4I3fIQolvjHnjREvQgbdrEO9Z96v1Kk=";
|
2023-10-30 23:09:06 +00:00
|
|
|
};
|
|
|
|
|
2024-03-17 21:55:43 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
2023-11-30 22:47:34 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"packaging"
|
|
|
|
];
|
|
|
|
|
2024-03-17 21:55:43 +00:00
|
|
|
dependencies = [
|
2023-10-30 23:09:06 +00:00
|
|
|
build
|
|
|
|
coloredlogs
|
|
|
|
packaging
|
2023-11-09 13:06:41 +00:00
|
|
|
pip
|
2024-08-01 15:34:53 +00:00
|
|
|
urllib3
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ toml ]
|
|
|
|
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]
|
|
|
|
;
|
2023-10-30 23:09:06 +00:00
|
|
|
|
2023-11-05 22:56:16 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bork"
|
|
|
|
"bork.api"
|
|
|
|
"bork.cli"
|
|
|
|
];
|
|
|
|
|
2023-11-17 11:20:21 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-03-17 21:55:43 +00:00
|
|
|
|
2023-11-17 11:20:21 +00:00
|
|
|
pytestFlagsArray = [ "-m 'not network'" ];
|
|
|
|
|
2024-03-17 21:55:43 +00:00
|
|
|
disabledTests = [
|
|
|
|
# tries to call python -m bork
|
|
|
|
"test_repo"
|
|
|
|
];
|
|
|
|
|
2024-08-08 14:28:17 +00:00
|
|
|
passthru.tests = callPackage ./tests.nix { };
|
|
|
|
|
2023-10-30 23:09:06 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python build and release management tool";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "bork";
|
2023-10-30 23:09:06 +00:00
|
|
|
homepage = "https://github.com/duckinator/bork";
|
2024-08-02 11:17:33 +00:00
|
|
|
license = licenses.mit;
|
2023-10-30 23:09:06 +00:00
|
|
|
maintainers = with maintainers; [ nicoo ];
|
|
|
|
};
|
|
|
|
}
|