2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitLab, fetchFromGitHub, buildGoModule, ruby
|
|
|
|
, bundlerEnv, pkg-config
|
2020-11-30 08:33:03 +00:00
|
|
|
# libgit2 + dependencies
|
|
|
|
, libgit2, openssl, zlib, pcre, http-parser }:
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2020-11-30 08:33:03 +00:00
|
|
|
in buildGoModule rec {
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "13.11.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gitaly";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitaly";
|
|
|
|
rev = "v${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "sha256-qcrvNmnlrdJYXAlt65bA0Ij7zuX7QwVukC3A4KGL3sk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
vendorSha256 = "sha256-VAXQPVyB+XdfOqGaT1H/83ed6xV+4Tr5fkBu1eyPe2k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit rubyEnv;
|
|
|
|
};
|
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
buildFlags = [ "-tags=static,system_libgit2" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-04-08 16:26:57 +00:00
|
|
|
buildInputs = [ rubyEnv.wrappedRuby libgit2 openssl zlib pcre http-parser ];
|
2020-11-30 08:33:03 +00:00
|
|
|
doCheck = false;
|
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
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|