about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/continuous-integration/forgejo-actions-runner/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/continuous-integration/forgejo-actions-runner/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/continuous-integration/forgejo-actions-runner/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/continuous-integration/forgejo-actions-runner/default.nix b/nixpkgs/pkgs/development/tools/continuous-integration/forgejo-actions-runner/default.nix
new file mode 100644
index 000000000000..8b9a108d3db5
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/continuous-integration/forgejo-actions-runner/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, buildGoModule
+, fetchFromGitea
+, testers
+, forgejo-actions-runner
+}:
+
+buildGoModule rec {
+  pname = "forgejo-actions-runner";
+  version = "2.4.0";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "forgejo";
+    repo = "runner";
+    rev = "v${version}";
+    hash = "sha256-EEwXo2MvdBlSMho4rrYD4wXLccS/30NbCuxO0CUktgE=";
+  };
+
+  vendorHash = "sha256-FspNmiphGHSeZFmdlWIDsEUrCc8THfb0Wm67cMCTtHI=";
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${src.rev}"
+  ];
+
+  doCheck = false; # Test try to lookup code.forgejo.org.
+
+  passthru.tests.version = testers.testVersion {
+    package = forgejo-actions-runner;
+    version = src.rev;
+  };
+
+  meta = with lib; {
+    description = "A runner for Forgejo based on act";
+    homepage = "https://code.forgejo.org/forgejo/runner";
+    changelog = "https://gitea.com/gitea/act_runner/releases/tag/${src.rev}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ kranzes ];
+    mainProgram = "act_runner";
+  };
+}