depot/third_party/nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

57 lines
1.5 KiB
Nix

{ lib, fetchFromGitLab, fetchFromGitHub, buildGoModule, ruby
, bundlerEnv, pkg-config
# libgit2 + dependencies
, libgit2_1_3_0, openssl, zlib, pcre, http-parser }:
let
rubyEnv = bundlerEnv rec {
name = "gitaly-env";
inherit ruby;
copyGemFiles = true;
gemdir = ./.;
};
version = "14.8.2";
gitaly_package = "gitlab.com/gitlab-org/gitaly/v${lib.versions.major version}";
in
buildGoModule {
pname = "gitaly";
inherit version;
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
sha256 = "sha256-GgQscKxxYpvzU2M99gmvGj0HM/oD+2Ke24FRzUxv6HM=";
};
vendorSha256 = "sha256-Qw9/nlo1eB5dPcldXe9doy4QA4DDVUDad3o4kbdNu34=";
passthru = {
inherit rubyEnv;
};
ldflags = "-X ${gitaly_package}/internal/version.version=${version} -X ${gitaly_package}/internal/version.moduleVersion=${version}";
tags = [ "static,system_libgit2" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ rubyEnv.wrappedRuby libgit2_1_3_0 openssl zlib pcre http-parser ];
doCheck = false;
postInstall = ''
mkdir -p $ruby
cp -rv $src/ruby/{bin,lib,proto,git-hooks} $ruby
mv $out/bin/gitaly-git2go $out/bin/gitaly-git2go-${version}
'';
outputs = [ "out" "ruby" ];
meta = with 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 ++ [ "x86_64-darwin" ];
maintainers = with maintainers; [ roblabla globin fpletz talyz yayayayaka ];
license = licenses.mit;
};
}