nixpkgs/pkgs/by-name/fo/forgejo-runner/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.3 KiB
Nix
Raw Normal View History

{
lib,
buildGoModule,
fetchFromGitea,
nixosTests,
versionCheckHook,
2023-07-20 19:36:21 +00:00
}:
let
# tests which assume network access in some form
disabledTests = [
"Test_runCreateRunnerFile"
"Test_ping"
];
in
2023-07-20 19:36:21 +00:00
buildGoModule rec {
pname = "forgejo-runner";
version = "5.0.3";
2023-07-20 19:36:21 +00:00
src = fetchFromGitea {
domain = "code.forgejo.org";
2023-07-20 19:36:21 +00:00
owner = "forgejo";
repo = "runner";
rev = "v${version}";
hash = "sha256-c1s2n4s2LY4KvQrPZJpAnXzJCTe6Fbc0cf1plwHZPiA=";
2023-07-20 19:36:21 +00:00
};
vendorHash = "sha256-DQcVknodbVlHygJkrGSfVGPKXR9kLGeyivNjYmjtFNs=";
2023-07-20 19:36:21 +00:00
ldflags = [
"-s"
"-w"
"-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${src.rev}"
];
checkFlags = [
"-skip ${lib.concatStringsSep "|" disabledTests}"
];
2023-07-20 19:36:21 +00:00
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
versionCheckProgramArg = [ "--version" ];
passthru.tests = {
inherit (nixosTests.forgejo) sqlite3;
2023-07-20 19:36:21 +00:00
};
meta = with lib; {
description = "Runner for Forgejo based on act";
homepage = "https://code.forgejo.org/forgejo/runner";
2024-04-04 00:04:47 +00:00
changelog = "https://code.forgejo.org/forgejo/runner/src/tag/${src.rev}/RELEASE-NOTES.md";
2023-07-20 19:36:21 +00:00
license = licenses.mit;
maintainers = with maintainers; [ kranzes emilylange ];
2023-07-20 19:36:21 +00:00
mainProgram = "act_runner";
};
}