nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix

57 lines
1.4 KiB
Nix
Raw Normal View History

2020-11-26 04:41:18 -08:00
{ stdenv, fetchFromGitLab, fetchFromGitHub, buildGoModule, ruby,
bundlerEnv, pkgconfig, libgit2_0_27 }:
2017-07-05 14:53:31 -07:00
2017-09-03 06:38:28 -07:00
let
rubyEnv = bundlerEnv rec {
2017-09-03 06:38:28 -07:00
name = "gitaly-env";
inherit ruby;
copyGemFiles = true;
2017-09-03 06:38:28 -07:00
gemdir = ./.;
gemset =
2019-07-15 18:29:57 -07: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 06:38:28 -07:00
};
2020-11-26 04:41:18 -08:00
in buildGoModule rec {
version = "13.6.0";
pname = "gitaly";
2017-07-05 14:53:31 -07:00
2017-09-03 06:38:28 -07:00
src = fetchFromGitLab {
2017-07-05 14:53:31 -07:00
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
sha256 = "1b3vjg5sxrg8cfxn1nh8j26h847kxrfnn2chbb5v3ivhp1kp6zh2";
2017-07-05 14:53:31 -07:00
};
2020-11-26 04:41:18 -08:00
vendorSha256 = "15mx5g2wa93sajbdwh58wcspg0n51d1ciwb7f15d0nm5hspz3w9r";
2017-07-05 14:53:31 -07:00
2017-09-03 06:38:28 -07:00
passthru = {
inherit rubyEnv;
};
2018-09-24 17:11:36 -07:00
2019-07-15 16:17:38 -07:00
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ rubyEnv.wrappedRuby libgit2_0_27 ];
2020-11-26 04:41:18 -08:00
doCheck = false;
2017-09-03 06:38:28 -07:00
postInstall = ''
mkdir -p $ruby
cp -rv $src/ruby/{bin,lib,proto,git-hooks} $ruby
2017-07-05 14:53:31 -07:00
'';
outputs = [ "out" "ruby" ];
2017-09-03 06:38:28 -07:00
2017-07-05 14:53:31 -07:00
meta = with stdenv.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 12:27:05 -08:00
maintainers = with maintainers; [ roblabla globin fpletz talyz ];
2017-07-05 14:53:31 -07:00
license = licenses.mit;
};
}