2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-02 11:29:13 +00:00
|
|
|
, pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonRelaxDepsHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
2023-11-16 04:20:00 +00:00
|
|
|
, build
|
|
|
|
, coloredlogs
|
|
|
|
, packaging
|
2024-01-02 11:29:13 +00:00
|
|
|
, pip
|
2024-04-21 15:54:59 +00:00
|
|
|
, readme-renderer
|
2023-11-16 04:20:00 +00:00
|
|
|
, toml
|
|
|
|
, twine
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bork";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "8.0.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "duckinator";
|
|
|
|
repo = pname;
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-BDwVhKmZ/F8CvpT6dEI5moQZx8wHy1TwdOl889XogEo=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonRelaxDepsHook
|
2024-04-21 15:54:59 +00:00
|
|
|
setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"packaging"
|
2024-04-21 15:54:59 +00:00
|
|
|
"readme-renderer"
|
2024-01-13 08:15:51 +00:00
|
|
|
"twine"
|
|
|
|
"wheel"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-11-16 04:20:00 +00:00
|
|
|
build
|
|
|
|
coloredlogs
|
|
|
|
packaging
|
2024-01-02 11:29:13 +00:00
|
|
|
pip
|
2024-04-21 15:54:59 +00:00
|
|
|
readme-renderer
|
2023-11-16 04:20:00 +00:00
|
|
|
twine
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
toml
|
2023-11-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bork"
|
|
|
|
"bork.api"
|
|
|
|
"bork.cli"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not network'"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# tries to call python -m bork
|
|
|
|
"test_repo"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python build and release management tool";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "bork";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://github.com/duckinator/bork";
|
|
|
|
maintainers = with maintainers; [ nicoo ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|