2020-03-02 20:21:35 +00:00
|
|
|
{ stdenv, fetchFromGitLab, fetchFromGitHub, buildGoPackage, ruby,
|
2020-04-28 18:35:51 +01:00
|
|
|
bundlerEnv, pkgconfig, libgit2_0_27 }:
|
2017-07-05 22:53:31 +01:00
|
|
|
|
2017-09-03 14:38:28 +01:00
|
|
|
let
|
2019-07-10 01:09:15 +01:00
|
|
|
rubyEnv = bundlerEnv rec {
|
2017-09-03 14:38:28 +01:00
|
|
|
name = "gitaly-env";
|
|
|
|
inherit ruby;
|
2020-03-03 19:13:49 +00:00
|
|
|
copyGemFiles = true;
|
2017-09-03 14:38:28 +01:00
|
|
|
gemdir = ./.;
|
2019-07-10 01:09:15 +01:00
|
|
|
gemset =
|
2019-07-16 02:29:57 +01:00
|
|
|
let x = import (gemdir + "/gemset.nix");
|
2019-07-10 01:09:15 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
2017-09-03 14:38:28 +01:00
|
|
|
};
|
|
|
|
in buildGoPackage rec {
|
2020-10-22 12:04:51 +01:00
|
|
|
version = "13.5.1";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gitaly";
|
2017-07-05 22:53:31 +01:00
|
|
|
|
2017-09-03 14:38:28 +01:00
|
|
|
src = fetchFromGitLab {
|
2017-07-05 22:53:31 +01:00
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitaly";
|
2020-01-13 20:49:18 +00:00
|
|
|
rev = "v${version}";
|
2020-10-22 12:04:51 +01:00
|
|
|
sha256 = "1vkifmp56lkgj178na7pqd5h9yxffcy78yaz7ykd4rmgi4c8ayk8";
|
2017-07-05 22:53:31 +01:00
|
|
|
};
|
|
|
|
|
2019-12-22 23:09:58 +00:00
|
|
|
# Fix a check which assumes that hook files are writeable by their
|
|
|
|
# owner.
|
2020-05-18 22:50:02 +01:00
|
|
|
patches = [
|
|
|
|
./fix-executable-check.patch
|
|
|
|
];
|
2019-12-22 23:09:58 +00:00
|
|
|
|
2017-09-03 14:38:28 +01:00
|
|
|
goPackagePath = "gitlab.com/gitlab-org/gitaly";
|
2017-07-05 22:53:31 +01:00
|
|
|
|
2017-09-03 14:38:28 +01:00
|
|
|
passthru = {
|
|
|
|
inherit rubyEnv;
|
|
|
|
};
|
2018-09-25 01:11:36 +01:00
|
|
|
|
2019-07-16 00:17:38 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2020-03-02 20:21:35 +00:00
|
|
|
buildInputs = [ rubyEnv.wrappedRuby libgit2_0_27 ];
|
2019-07-16 00:17:38 +01:00
|
|
|
goDeps = ./deps.nix;
|
2020-09-28 22:42:57 +01:00
|
|
|
preBuild = "rm -rf go/src/gitlab.com/gitlab-org/labkit/vendor";
|
2018-06-06 12:04:35 +01:00
|
|
|
|
2017-09-03 14:38:28 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $ruby
|
2019-10-01 14:38:22 +01:00
|
|
|
cp -rv $src/ruby/{bin,lib,proto,git-hooks,gitlab-shell} $ruby
|
2017-07-05 22:53:31 +01:00
|
|
|
'';
|
|
|
|
|
2020-04-28 02:50:57 +01:00
|
|
|
outputs = [ "out" "ruby" ];
|
2017-09-03 14:38:28 +01:00
|
|
|
|
2017-07-05 22:53:31 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://gitlab.com/gitlab-org/gitaly";
|
2019-10-06 05:59:27 +01:00
|
|
|
description = "A Git RPC service for handling all the git calls made by GitLab";
|
2019-10-09 14:45:12 +01:00
|
|
|
platforms = platforms.linux;
|
2020-03-02 20:27:05 +00:00
|
|
|
maintainers = with maintainers; [ roblabla globin fpletz talyz ];
|
2017-07-05 22:53:31 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|