My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/applications/version-management/gitlab/gitaly/default.nix

57 lines
1.4 KiB

{ stdenv, fetchFromGitLab, fetchFromGitHub, buildGoModule, ruby,
bundlerEnv, pkgconfig, libgit2_0_27 }:
let
rubyEnv = bundlerEnv rec {
name = "gitaly-env";
inherit ruby;
copyGemFiles = true;
gemdir = ./.;
gemset =
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;
};
};
};
in buildGoModule rec {
version = "13.6.1";
pname = "gitaly";
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
sha256 = "02w7pf7l9sr2nk8ky9b0d5b4syx3d9my65h2kzvh2afk7kv35h5y";
};
vendorSha256 = "15mx5g2wa93sajbdwh58wcspg0n51d1ciwb7f15d0nm5hspz3w9r";
passthru = {
inherit rubyEnv;
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ rubyEnv.wrappedRuby libgit2_0_27 ];
doCheck = false;
postInstall = ''
mkdir -p $ruby
cp -rv $src/ruby/{bin,lib,proto,git-hooks} $ruby
'';
outputs = [ "out" "ruby" ];
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;
maintainers = with maintainers; [ roblabla globin fpletz talyz ];
license = licenses.mit;
};
}