gitlab: add gitlab-artifact-cleanup

This commit is contained in:
Leonardo Eugênio 2026-08-04 20:40:47 -03:00
parent 29ce7579a5
commit 7b32e2db1e
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,65 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
let
yacl = python3Packages.buildPythonPackage rec {
pname = "yacl";
version = "0.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "IngoMeyer441";
repo = "yacl";
rev = "v${version}";
hash = "sha256-W62amvrH8RdWpBhfmj+iVyekuDhr74ueIOzRw6GO2i8=";
};
build-system = with python3Packages; [ setuptools ];
optional-dependencies = {
colored_exceptions = with python3Packages; [ pygments ];
};
pythonImportsCheck = [ "yacl" ];
meta = {
description = "Yet Another Color Logger for Python programs";
homepage = "https://github.com/IngoMeyer441/yacl";
license = lib.licenses.mit;
};
};
in
python3Packages.buildPythonApplication rec {
pname = "gitlab-artifact-cleanup";
version = "0.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "sciapp";
repo = "gitlab-artifact-cleanup";
rev = "v${version}";
hash = "sha256-xjJyP1z7bAGjTYxFYByeFbFXu/R8908K8upH5fRZnTs=";
};
build-system = with python3Packages; [ setuptools ];
dependencies =
with python3Packages;
[
python-gitlab
yacl
]
++ yacl.optional-dependencies.colored_exceptions;
pythonImportsCheck = [ "gitlab_artifact_cleanup" ];
meta = {
description = "Tool for cleaning up old GitLab CI/CD job artifacts";
homepage = "https://github.com/sciapp/gitlab-artifact-cleanup";
license = lib.licenses.mit;
mainProgram = "gitlab-artifact-cleanup";
};
}