about summary refs log tree commit diff
path: root/pkgs/applications/version-management/gitlab-shell
diff options
context:
space:
mode:
authorroblabla <robinlambertz+dev@gmail.com>2017-07-05 23:53:31 +0200
committerroblabla <robinlambertz+dev@gmail.com>2017-07-06 13:29:49 +0200
commit0c7c421baa25782a658581fb609240a91400523d (patch)
treed1c936ca10fc7c1aaea466430931ba7d49421305 /pkgs/applications/version-management/gitlab-shell
parent8dee8d5f5c04b4b9fe39d1e6cdffcd0c881bf0fc (diff)
downloadnixlib-0c7c421baa25782a658581fb609240a91400523d.tar
nixlib-0c7c421baa25782a658581fb609240a91400523d.tar.gz
nixlib-0c7c421baa25782a658581fb609240a91400523d.tar.bz2
nixlib-0c7c421baa25782a658581fb609240a91400523d.tar.lz
nixlib-0c7c421baa25782a658581fb609240a91400523d.tar.xz
nixlib-0c7c421baa25782a658581fb609240a91400523d.tar.zst
nixlib-0c7c421baa25782a658581fb609240a91400523d.zip
gitlab: 8.17.6 -> 9.3.4
Diffstat (limited to 'pkgs/applications/version-management/gitlab-shell')
-rw-r--r--pkgs/applications/version-management/gitlab-shell/default.nix11
-rw-r--r--pkgs/applications/version-management/gitlab-shell/fixes.patch17
-rw-r--r--pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch20
3 files changed, 40 insertions, 8 deletions
diff --git a/pkgs/applications/version-management/gitlab-shell/default.nix b/pkgs/applications/version-management/gitlab-shell/default.nix
index a67ca4acfb67..5cbd073f2848 100644
--- a/pkgs/applications/version-management/gitlab-shell/default.nix
+++ b/pkgs/applications/version-management/gitlab-shell/default.nix
@@ -1,23 +1,24 @@
-{ stdenv, ruby, bundler, fetchFromGitLab }:
+{ stdenv, ruby, bundler, fetchFromGitLab, go }:
 
 stdenv.mkDerivation rec {
-  version = "4.1.1";
+  version = "5.1.1";
   name = "gitlab-shell-${version}";
 
   srcs = fetchFromGitLab {
     owner = "gitlab-org";
     repo = "gitlab-shell";
     rev = "v${version}";
-    sha256 = "1i7dqs0csqcjwkvg8csz5f1zxy1inrzxzz3g9j618aldqxzjfgnr";
+    sha256 = "0prpn1icdz8rq6kyk3rv1kd1ckgngf18gnpb86w1ncg78kb9azsl";
   };
 
   buildInputs = [
-    ruby bundler
+    ruby bundler go
   ];
 
-  patches = [ ./remove-hardcoded-locations.patch ];
+  patches = [ ./remove-hardcoded-locations.patch ./fixes.patch ];
 
   installPhase = ''
+    ruby bin/compile
     mkdir -p $out/
     cp -R . $out/
 
diff --git a/pkgs/applications/version-management/gitlab-shell/fixes.patch b/pkgs/applications/version-management/gitlab-shell/fixes.patch
new file mode 100644
index 000000000000..1c694266e470
--- /dev/null
+++ b/pkgs/applications/version-management/gitlab-shell/fixes.patch
@@ -0,0 +1,17 @@
+diff --git a/support/go_build.rb b/support/go_build.rb
+index 82f94d2..40ba35e 100644
+--- a/support/go_build.rb
++++ b/support/go_build.rb
+@@ -25,9 +25,8 @@ module GoBuild
+   def run!(env, cmd)
+     raise "env must be a hash" unless env.is_a?(Hash)
+     raise "cmd must be an array" unless cmd.is_a?(Array)
+-  
+-    if !system(env, *cmd)
+-      abort "command failed: #{env.inspect} #{cmd.join(' ')}"
+-    end
++    puts "Starting #{env.inspect} #{cmd.join(' ')}"
++    Process::wait(Process::spawn(env, *cmd))
++    abort "command failed: #{env.inspect} #{cmd.join(' ')}" unless $?.exitstatus == 0
+   end
+ end
diff --git a/pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch b/pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch
index e1c924cdeefd..e88dbad071f5 100644
--- a/pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch
+++ b/pkgs/applications/version-management/gitlab-shell/remove-hardcoded-locations.patch
@@ -1,9 +1,9 @@
 diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
-index c1d175a..7f7fd2f 100644
+index 0b11ce3..ffc3faf 100644
 --- a/lib/gitlab_projects.rb
 +++ b/lib/gitlab_projects.rb
-@@ -5,7 +5,7 @@ require_relative 'gitlab_config'
- require_relative 'gitlab_logger'
+@@ -8,7 +8,7 @@ require_relative 'gitlab_metrics'
+ require_relative 'gitlab_reference_counter'
  
  class GitlabProjects
 -  GLOBAL_HOOKS_DIRECTORY = File.join(ROOT_PATH, 'hooks')
@@ -11,3 +11,17 @@ index c1d175a..7f7fd2f 100644
  
    # Project name is a directory name for repository with .git at the end
    # It may be namespaced or not. Like repo.git or gitlab/repo.git
+diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
+index e7d0254..181ec8a 100644
+--- a/lib/gitlab_shell.rb
++++ b/lib/gitlab_shell.rb
+@@ -163,7 +163,8 @@ class GitlabShell
+     end
+ 
+     # 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