diff options
author | talyz <kim.lindberger@gmail.com> | 2019-10-02 16:44:55 +0200 |
---|---|---|
committer | talyz <kim.lindberger@gmail.com> | 2019-10-04 18:06:23 +0200 |
commit | 09e657efea00126b22c3268a318139eee6ba973a (patch) | |
tree | 3a5fb51a630b615990836e6d74a564185e946f7c /pkgs/applications/version-management/gitlab/gitlab-shell | |
parent | f3eb063ecfb0cb76e2cef1e9c9764cdee92f9ed7 (diff) | |
download | nixlib-09e657efea00126b22c3268a318139eee6ba973a.tar nixlib-09e657efea00126b22c3268a318139eee6ba973a.tar.gz nixlib-09e657efea00126b22c3268a318139eee6ba973a.tar.bz2 nixlib-09e657efea00126b22c3268a318139eee6ba973a.tar.lz nixlib-09e657efea00126b22c3268a318139eee6ba973a.tar.xz nixlib-09e657efea00126b22c3268a318139eee6ba973a.tar.zst nixlib-09e657efea00126b22c3268a318139eee6ba973a.zip |
gitlab-shell: Split patch into ruby and go parts
Split the remove-hardcoded-locations patch into two separate patches, one for the ruby package and one for the go package. This is clearer and results in fewer rebuilds.
Diffstat (limited to 'pkgs/applications/version-management/gitlab/gitlab-shell')
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitlab-shell/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-go.patch (renamed from pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch) | 29 | ||||
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch | 27 |
3 files changed, 31 insertions, 31 deletions
diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix index 3022aeac14e6..bb406d664498 100644 --- a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix @@ -17,7 +17,7 @@ let pname = "gitlab-shell-go"; inherit src version; - patches = [ ./remove-hardcoded-locations.patch ]; + patches = [ ./remove-hardcoded-locations-go.patch ]; goPackagePath = "gitlab.com/gitlab-org/gitlab-shell"; goDeps = ./deps.nix; @@ -36,8 +36,8 @@ in stdenv.mkDerivation { pname = "gitlab-shell"; inherit src version; - - patches = [ ./remove-hardcoded-locations.patch ]; + + patches = [ ./remove-hardcoded-locations-ruby.patch ]; # gitlab-shell will try to read its config relative to the source # code by default which doesn't work in nixos because it's a diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-go.patch index ef3604d8c0d6..a4a1a979b248 100644 --- a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-go.patch @@ -10,7 +10,7 @@ index f951fe6..b422fe3 100644 "path" "strings" -@@ -30,16 +29,13 @@ type Config struct { +@@ -44,16 +43,13 @@ type Config struct { } func New() (*Config, error) { @@ -29,33 +29,6 @@ index f951fe6..b422fe3 100644 } func (c *Config) FeatureEnabled(featureName string) bool { -diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb -index 0600a18..c46f2d7 100644 ---- a/lib/gitlab_keys.rb -+++ b/lib/gitlab_keys.rb -@@ -10,7 +10,7 @@ class GitlabKeys # rubocop:disable Metrics/ClassLength - attr_accessor :auth_file, :key - - def self.command(whatever) -- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}" -+ "/run/current-system/sw/bin/gitlab-shell #{whatever}" - end - - def self.command_key(key_id) -diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb -index 2cb76a8..f59ad5e 100644 ---- a/lib/gitlab_shell.rb -+++ b/lib/gitlab_shell.rb -@@ -190,7 +190,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength - - args = [executable, gitaly_address, json_args] - # We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is. -- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH) -+ # Except we don't, because we're already in the right directory on nixos! -+ Kernel.exec(env, *args, unsetenv_others: true) - end - - def api diff --git a/go/internal/command/fallback/fallback.go b/go/internal/command/fallback/fallback.go index 2cb76a8..f59ad5e 100644 --- a/go/internal/command/fallback/fallback.go diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch new file mode 100644 index 000000000000..64623ae310c0 --- /dev/null +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations-ruby.patch @@ -0,0 +1,27 @@ +diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb +index 0600a18..c46f2d7 100644 +--- a/lib/gitlab_keys.rb ++++ b/lib/gitlab_keys.rb +@@ -2,7 +2,7 @@ class GitlabKeys # rubocop:disable Metrics/ClassLength + attr_accessor :auth_file, :key + + def self.command(whatever) +- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}" ++ "/run/current-system/sw/bin/gitlab-shell #{whatever}" + end + + def self.command_key(key_id) +diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb +index 2cb76a8..f59ad5e 100644 +--- a/lib/gitlab_shell.rb ++++ b/lib/gitlab_shell.rb +@@ -195,7 +195,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength + + args = [executable, gitaly_address, json_args] + # We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is. +- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH) ++ # Except we don't, because we're already in the right directory on nixos! ++ Kernel.exec(env, *args, unsetenv_others: true) + end + + def api |