From 2ab474b4a7136e9a0bb4dcee389a6adac73ce6d8 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Thu, 11 May 2017 23:16:31 +0200 Subject: [PATCH] gitlab-runner_1_11: add patch to fetch shells from system path --- .../gitlab-runner/v1-fix-shell-path.patch | 13 +++++++++++++ .../continuous-integration/gitlab-runner/v1.nix | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/development/tools/continuous-integration/gitlab-runner/v1-fix-shell-path.patch diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/v1-fix-shell-path.patch b/pkgs/development/tools/continuous-integration/gitlab-runner/v1-fix-shell-path.patch new file mode 100644 index 000000000000..612c9a51f281 --- /dev/null +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/v1-fix-shell-path.patch @@ -0,0 +1,13 @@ +diff --git a/shells/bash.go b/shells/bash.go +index c9c8b68..c97dbb5 100644 +--- a/shells/bash.go ++++ b/shells/bash.go +@@ -208,7 +208,7 @@ func (b *BashShell) GetConfiguration(info common.ShellScriptInfo) (script *commo + if info.User != "" { + script.Command = "su" + if runtime.GOOS == "linux" { +- script.Arguments = append(script.Arguments, "-s", "/bin/"+b.Shell) ++ script.Arguments = append(script.Arguments, "-s", "/run/current-system/sw/bin/"+b.Shell) + } + script.Arguments = append(script.Arguments, info.User) + script.Arguments = append(script.Arguments, "-c", shellCommand) diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix index cfc952395c2f..e0c3854740ab 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/v1.nix @@ -32,6 +32,8 @@ buildGoPackage rec { sha256 = "1sjvlb5981ykc8hr4kp1ibh9jw2wdjjp9zs2nqs9lpsav4nda5fr"; }; + patches = [ ./v1-fix-shell-path.patch ]; + buildInputs = [ go-bindata ]; preBuild = ''