1 { lib, buildGoModule, fetchFromGitLab, fetchurl, bash }:
8 pname = "gitlab-runner";
10 commonPackagePath = "gitlab.com/gitlab-org/gitlab-runner/common";
12 "-X ${commonPackagePath}.NAME=gitlab-runner"
13 "-X ${commonPackagePath}.VERSION=${version}"
14 "-X ${commonPackagePath}.REVISION=v${version}"
18 buildInputs = [ bash ];
20 vendorHash = "sha256-ng3ea60qK98nKGmwlSN2hPiE4BF64cgxEYPSeAoeOh0=";
22 src = fetchFromGitLab {
24 repo = "gitlab-runner";
26 sha256 = "sha256-TN8T/iib7G1NjyHZzZw686KZ3RCwpA1xRli3/0fnLBI=";
30 ./fix-shell-path.patch
31 ./remove-bash-test.patch
35 # Remove some tests that can't work during a nix build
37 # Requires to run in a git repo
38 sed -i "s/func TestCacheArchiverAddingUntrackedFiles/func OFF_TestCacheArchiverAddingUntrackedFiles/" commands/helpers/file_archiver_test.go
39 sed -i "s/func TestCacheArchiverAddingUntrackedUnicodeFiles/func OFF_TestCacheArchiverAddingUntrackedUnicodeFiles/" commands/helpers/file_archiver_test.go
41 # No writable developer environment
42 rm common/build_test.go
43 rm common/build_settings_test.go
44 rm executors/custom/custom_test.go
46 # No docker during build
47 rm executors/docker/terminal_test.go
48 rm executors/docker/docker_test.go
49 rm helpers/docker/auth/auth_test.go
50 rm executors/docker/services_test.go
54 # CI helper script for pushing images to Docker and ECR registries
55 # https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/4139
56 "./scripts/sync-docker-images"
60 install packaging/root/usr/share/gitlab-runner/clear-docker-cache $out/bin
64 # Make the tests pass outside of GitLab CI
69 description = "GitLab Runner the continuous integration executor of GitLab";
70 license = licenses.mit;
71 homepage = "https://docs.gitlab.com/runner/";
72 platforms = platforms.unix ++ platforms.darwin;
73 maintainers = with maintainers; [ bachp zimbatm ] ++ teams.gitlab.members;