mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-23 05:14:45 +00:00
e41fbfb280
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitea,
|
|
nixosTests,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
let
|
|
# tests which assume network access in some form
|
|
disabledTests = [
|
|
"Test_runCreateRunnerFile"
|
|
"Test_ping"
|
|
];
|
|
in
|
|
buildGoModule rec {
|
|
pname = "forgejo-runner";
|
|
version = "5.0.3";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "code.forgejo.org";
|
|
owner = "forgejo";
|
|
repo = "runner";
|
|
rev = "v${version}";
|
|
hash = "sha256-c1s2n4s2LY4KvQrPZJpAnXzJCTe6Fbc0cf1plwHZPiA=";
|
|
};
|
|
|
|
vendorHash = "sha256-DQcVknodbVlHygJkrGSfVGPKXR9kLGeyivNjYmjtFNs=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${src.rev}"
|
|
];
|
|
|
|
checkFlags = [
|
|
"-skip ${lib.concatStringsSep "|" disabledTests}"
|
|
];
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
|
|
versionCheckProgramArg = [ "--version" ];
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests.forgejo) sqlite3;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Runner for Forgejo based on act";
|
|
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 ];
|
|
mainProgram = "act_runner";
|
|
};
|
|
}
|