22017988c6
GitOrigin-RevId: c777cdf5c564015d5f63b09cc93bef4178b19b01
57 lines
1.6 KiB
Nix
57 lines
1.6 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.10.1";
|
|
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-4TbCfe41Nea1p0aDqGbF4SskUl5r9LRHKA16DH97jMI=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-ZL61t+Ii2Ns3TmitiF93exinod54+RCqrbdpU67HeY0=";
|
|
|
|
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} $ruby
|
|
mv $out/bin/gitaly-git2go-v${lib.versions.major version} $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;
|
|
};
|
|
}
|