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
|
2022-03-05 16:20:37 +00:00
|
|
|
, libgit2_1_3_0, 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 = ./.;
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "15.1.2";
|
2022-06-26 10:26:21 +00:00
|
|
|
package_version = "v${lib.versions.major version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
buildGoModule {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gitaly";
|
2021-09-18 10:52:07 +00:00
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitaly";
|
|
|
|
rev = "v${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-g/SlrE/NVMYqZaEgKncMLjsfI8jAE0xfyy6rpShsi2Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
vendorSha256 = "sha256-0JWJ2mpf79gJdnNRdlQLi0oDvnj6VmibkW2XcPnaCww=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit rubyEnv;
|
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
ldflags = "-X ${gitaly_package}/internal/version.version=${version} -X ${gitaly_package}/internal/version.moduleVersion=${version}";
|
|
|
|
|
2021-08-06 21:57:35 +00:00
|
|
|
tags = [ "static,system_libgit2" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2022-03-05 16:20:37 +00:00
|
|
|
buildInputs = [ rubyEnv.wrappedRuby libgit2_1_3_0 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
|
2022-03-30 09:31:56 +00:00
|
|
|
cp -rv $src/ruby/{bin,lib,proto} $ruby
|
2022-06-16 17:23:12 +00:00
|
|
|
mv $out/bin/gitaly-git2go-${package_version} $out/bin/gitaly-git2go-${version}
|
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";
|
2021-12-19 01:06:50 +00:00
|
|
|
platforms = platforms.linux ++ [ "x86_64-darwin" ];
|
2022-03-05 16:20:37 +00:00
|
|
|
maintainers = with maintainers; [ roblabla globin fpletz talyz yayayayaka ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|