3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix

60 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitLab, fetchFromGitHub, buildGoModule, ruby
, bundlerEnv, pkg-config
2020-11-24 20:56:11 +00:00
# libgit2 + dependencies
, libgit2, openssl, zlib, pcre, http-parser }:
2017-07-05 22:53:31 +01:00
2017-09-03 14:38:28 +01:00
let
rubyEnv = bundlerEnv rec {
2017-09-03 14:38:28 +01:00
name = "gitaly-env";
inherit ruby;
copyGemFiles = true;
2017-09-03 14:38:28 +01:00
gemdir = ./.;
gemset =
2019-07-16 02:29:57 +01:00
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;
};
};
2017-09-03 14:38:28 +01:00
};
2020-11-26 12:41:18 +00:00
in buildGoModule rec {
version = "14.0.5";
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";
rev = "v${version}";
sha256 = "sha256-aZ+EDF9BOdsbE+Xsde259eRmQhnb6H5piLQsvzgVpGM=";
2017-07-05 22:53:31 +01:00
};
vendorSha256 = "sha256-U962bMmXNnenCYkSdk0Uy7Bz+b9JGU5rJHfblZoyC/I=";
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
2020-11-24 20:56:11 +00:00
buildFlags = [ "-tags=static,system_libgit2" ];
nativeBuildInputs = [ pkg-config ];
2021-04-07 15:52:15 +01:00
buildInputs = [ rubyEnv.wrappedRuby libgit2 openssl zlib pcre http-parser ];
2020-11-26 12:41:18 +00:00
doCheck = false;
2017-09-03 14:38:28 +01:00
postInstall = ''
mkdir -p $ruby
cp -rv $src/ruby/{bin,lib,proto,git-hooks} $ruby
2017-07-05 22:53:31 +01:00
'';
outputs = [ "out" "ruby" ];
2017-09-03 14:38:28 +01:00
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;
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;
};
}