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-09-25 04:45:31 +00:00
|
|
|
version = "13.0.14";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gitaly";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitaly";
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "16ynkwiv0faa60msashj5w1bc4rdh7yv2qjmpcbf7dwq54gqmlbv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Fix a check which assumes that hook files are writeable by their
|
|
|
|
# owner.
|
2020-06-02 18:00:15 +00:00
|
|
|
patches = [
|
|
|
|
./fix-executable-check.patch
|
|
|
|
];
|
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;
|
|
|
|
preBuild = "rm -r go/src/gitlab.com/gitlab-org/labkit/vendor";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $ruby
|
|
|
|
cp -rv $src/ruby/{bin,lib,proto,git-hooks,gitlab-shell} $ruby
|
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|