Skip to content

Commit

Permalink
forgejo-runner: 4.0.1 -> 5.0.3, various quality-of-life improvements (N…
Browse files Browse the repository at this point in the history
  • Loading branch information
emilylange authored Dec 2, 2024
2 parents 89bea7b + 8540239 commit 1663ca3
Showing 1 changed file with 35 additions and 16 deletions.
51 changes: 35 additions & 16 deletions pkgs/by-name/fo/forgejo-runner/package.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
{ lib
, buildGoModule
, fetchFromGitea
, testers
, forgejo-runner
, nixosTests
{
stdenv,
lib,
buildGoModule,
fetchFromGitea,
nixosTests,
versionCheckHook,
nix-update-script,
}:

let
# tests which assume network access in some form
disabledTests = [
"Test_runCreateRunnerFile"
"Test_ping"
];
in
buildGoModule rec {
pname = "forgejo-runner";
version = "4.0.1";
version = "5.0.3";

src = fetchFromGitea {
domain = "code.forgejo.org";
owner = "forgejo";
repo = "runner";
rev = "v${version}";
hash = "sha256-hG8gCohf+U8T9A9Abqey9upErJklbCp8HuzHQKFcu3E=";
hash = "sha256-c1s2n4s2LY4KvQrPZJpAnXzJCTe6Fbc0cf1plwHZPiA=";
};

vendorHash = "sha256-yRXI9/LVj4f7qFdScqfpL5WCsK+lJXa6yQmdbUhfrKY=";
vendorHash = "sha256-DQcVknodbVlHygJkrGSfVGPKXR9kLGeyivNjYmjtFNs=";

ldflags = [
"-s"
"-w"
"-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${src.rev}"
];

doCheck = false; # Test try to lookup code.forgejo.org.
checkFlags = [
"-skip ${lib.concatStringsSep "|" disabledTests}"
];

doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
versionCheckProgramArg = [ "--version" ];

passthru.tests = {
inherit (nixosTests.forgejo) sqlite3;
version = testers.testVersion {
package = forgejo-runner;
version = src.rev;
passthru = {
updateScript = nix-update-script { };
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
sqlite3 = nixosTests.forgejo.sqlite3;
};
};

Expand All @@ -41,7 +56,11 @@ buildGoModule rec {
homepage = "https://code.forgejo.org/forgejo/runner";
changelog = "https://code.forgejo.org/forgejo/runner/src/tag/${src.rev}/RELEASE-NOTES.md";
license = licenses.mit;
maintainers = with maintainers; [ kranzes emilylange ];
maintainers = with maintainers; [
kranzes
emilylange
christoph-heiss
];
mainProgram = "act_runner";
};
}

0 comments on commit 1663ca3

Please sign in to comment.