2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitLab, fetchFromGitHub, buildGoPackage, ruby,
|
2020-05-29 06:06:01 +00:00
|
|
|
bundlerEnv, pkgconfig, libgit2_0_27 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
rubyEnv = bundlerEnv rec {
|
|
|
|
name = "gitaly-env";
|
|
|
|
inherit ruby;
|
|
|
|
copyGemFiles = true;
|
|
|
|
gemdir = ./.;
|
|
|
|
gemset =
|
|
|
|
let x = import (gemdir + "/gemset.nix");
|
|
|
|
in x // {
|
|
|
|
# grpc expects the AR environment variable to contain `ar rpc`. See the
|
|
|
|
# discussion in nixpkgs #63056.
|
|
|
|
grpc = x.grpc // {
|
|
|
|
patches = [ ../fix-grpc-ar.patch ];
|
|
|
|
dontBuild = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in buildGoPackage rec {
|
2020-11-24 20:58:05 +00:00
|
|
|
version = "13.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gitaly";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitaly";
|
|
|
|
rev = "v${version}";
|
2020-11-24 20:58:05 +00:00
|
|
|
sha256 = "1b3vjg5sxrg8cfxn1nh8j26h847kxrfnn2chbb5v3ivhp1kp6zh2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "gitlab.com/gitlab-org/gitaly";
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit rubyEnv;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ rubyEnv.wrappedRuby libgit2_0_27 ];
|
|
|
|
goDeps = ./deps.nix;
|
2020-11-24 20:58:05 +00:00
|
|
|
preBuild = "rm -rf go/src/gitlab.com/gitlab-org/labkit/vendor";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $ruby
|
2020-11-24 20:58:05 +00:00
|
|
|
cp -rv $src/ruby/{bin,lib,proto,git-hooks} $ruby
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
outputs = [ "out" "ruby" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://gitlab.com/gitlab-org/gitaly";
|
|
|
|
description = "A Git RPC service for handling all the git calls made by GitLab";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ roblabla globin fpletz talyz ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|