From 3bd7d7ef19c199554c29925a84f53fcb4f4e9016 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 2 Jun 2025 14:22:33 +0200 Subject: [PATCH] gnu: Add forgejo-runner. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/ci.scm (forgejo-runner): New variable. Co-authored-by: Ludovic Courtès Change-Id: I1b7df940015a064c1b9236d4bb2a50bf33ed5155 --- gnu/packages/ci.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm index 250abb12ab8..00866b7dfaf 100644 --- a/gnu/packages/ci.scm +++ b/gnu/packages/ci.scm @@ -7,6 +7,8 @@ ;;; Copyright © 2018 Clément Lassieur ;;; Copyright © 2022, 2024 Arun Isaac ;;; Copyright © 2023 David Pflug +;;; Copyright © 2025 David Thompson +;;; Copyright © 2025 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,6 +42,10 @@ #:use-module (gnu packages docbook) #:use-module (gnu packages compression) #:use-module (gnu packages databases) + #:use-module (gnu packages golang) + #:use-module (gnu packages golang-build) + #:use-module (gnu packages golang-vcs) + #:use-module (gnu packages golang-xyz) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) #:use-module (gnu packages gnupg) @@ -58,6 +64,7 @@ #:use-module (gnu packages xml) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix build-system go) #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR))) (define-public cuirass @@ -289,3 +296,52 @@ Laminar encourages the use of existing tools such as bash and cron instead of reinventing them.") (home-page "https://laminar.ohwg.net/") (license l:gpl3+))) + +(define-public forgejo-runner + (package + (name "forgejo-runner") + (version "6.2.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://code.forgejo.org/forgejo/runner.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0bdn1pk9ghbyd4i9hmk7rfhqdkz9l5w4wgrwiryg8qpwplb7j8mz")))) + (build-system go-build-system) + (arguments + (list + #:go go-1.23 + #:import-path "gitea.com/gitea/act_runner" + #:embed-files #~(list ".*\\.json" ".*\\.js" ".*\\.sh") + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'install 'rename-binary + (lambda _ + (rename-file (string-append #$output "/bin/act_runner") + (string-append #$output "/bin/forgejo-runner"))))))) + (propagated-inputs + (list go-github-com-joho-godotenv + go-github-com-avast-retry-go + go-gopkg-in-yaml-v3 + go-github-com-sirupsen-logrus + go-google-golang-org-protobuf + go-github-com-google-uuid + go-golang-org-x-term + go-golang-org-x-time + go-github-com-spf13-cobra + go-github-com-mattn-go-isatty + go-github-com-nektos-act + go-github-com-avast-retry-go-v4 + go-connectrpc-com-connect + go-code-gitea-io-actions-proto-go-ping + go-code-gitea-io-actions-proto-go-runner)) + (home-page "https://code.forgejo.org/forgejo/runner") + (synopsis "Run continuous integration jobs for Forgejo") + (description + "Forgejo Runner is a daemon that connects to a Forgejo instance and runs +jobs for continuous integration.") + (license l:expat))) +