about summary refs log tree commit diff
path: root/pkgs/applications/version-management/gitlab/gitaly/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/gitlab/gitaly/default.nix')
-rw-r--r--pkgs/applications/version-management/gitlab/gitaly/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix
new file mode 100644
index 000000000000..951dbf0bf25a
--- /dev/null
+++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitLab, buildGoPackage, ruby, bundlerEnv }:
+
+let
+  rubyEnv = bundlerEnv {
+    name = "gitaly-env";
+    inherit ruby;
+    gemdir = ./.;
+  };
+in buildGoPackage rec {
+  version = "0.129.0";
+  name = "gitaly-${version}";
+
+  src = fetchFromGitLab {
+    owner = "gitlab-org";
+    repo = "gitaly";
+    rev = "v${version}";
+    sha256 = "0lidqa0w0vy87p5xfmqrfvbyzvl9wj2p918qs2f5rc7shzm38rn6";
+  };
+
+  goPackagePath = "gitlab.com/gitlab-org/gitaly";
+
+  passthru = {
+    inherit rubyEnv;
+  };
+
+  buildInputs = [ rubyEnv.wrappedRuby ];
+
+  postInstall = ''
+    mkdir -p $ruby
+    cp -rv $src/ruby/{bin,lib} $ruby
+  '';
+
+  outputs = [ "bin" "out" "ruby" ];
+
+  meta = with stdenv.lib; {
+    homepage = http://www.gitlab.com/;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ roblabla ];
+    license = licenses.mit;
+  };
+}