8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
60 lines
1.7 KiB
Nix
60 lines
1.7 KiB
Nix
{ lib, buildGoModule, fetchFromGitLab, fetchurl }:
|
|
|
|
let
|
|
version = "14.9.1";
|
|
in
|
|
buildGoModule rec {
|
|
inherit version;
|
|
pname = "gitlab-runner";
|
|
|
|
commonPackagePath = "gitlab.com/gitlab-org/gitlab-runner/common";
|
|
ldflags = [
|
|
"-X ${commonPackagePath}.NAME=gitlab-runner"
|
|
"-X ${commonPackagePath}.VERSION=${version}"
|
|
"-X ${commonPackagePath}.REVISION=v${version}"
|
|
];
|
|
|
|
vendorSha256 = "0ag3pmcrxksgikdcvl9rv2s3kn7l0dj41pf2m9dq0g2a1j45nydn";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "gitlab-org";
|
|
repo = "gitlab-runner";
|
|
rev = "v${version}";
|
|
sha256 = "1h6fyhbc154fr6a8brva3clirgvga6sal6ikylf9mbkxbh7d9rcn";
|
|
};
|
|
|
|
patches = [
|
|
./fix-shell-path.patch
|
|
./remove-bash-test.patch
|
|
];
|
|
|
|
prePatch = ''
|
|
# Remove some tests that can't work during a nix build
|
|
|
|
# Requires to run in a git repo
|
|
sed -i "s/func TestCacheArchiverAddingUntrackedFiles/func OFF_TestCacheArchiverAddingUntrackedFiles/" commands/helpers/file_archiver_test.go
|
|
sed -i "s/func TestCacheArchiverAddingUntrackedUnicodeFiles/func OFF_TestCacheArchiverAddingUntrackedUnicodeFiles/" commands/helpers/file_archiver_test.go
|
|
|
|
# No writable developer environment
|
|
rm common/build_test.go
|
|
rm executors/custom/custom_test.go
|
|
|
|
# No docker during build
|
|
rm executors/docker/terminal_test.go
|
|
rm executors/docker/docker_test.go
|
|
rm helpers/docker/auth/auth_test.go
|
|
'';
|
|
|
|
preCheck = ''
|
|
# Make the tests pass outside of GitLab CI
|
|
export CI=0
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "GitLab Runner the continuous integration executor of GitLab";
|
|
license = licenses.mit;
|
|
homepage = "https://about.gitlab.com/gitlab-ci/";
|
|
platforms = platforms.unix ++ platforms.darwin;
|
|
maintainers = with maintainers; [ bachp zimbatm globin ];
|
|
};
|
|
}
|