1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00
nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix

64 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitLab, fetchFromGitHub, buildGoPackage, ruby,
bundlerEnv, pkgconfig, libgit2_0_27 }:
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
};
in buildGoPackage rec {
2020-10-22 12:04:51 +01:00
version = "13.5.1";
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}";
2020-10-22 12:04:51 +01:00
sha256 = "1vkifmp56lkgj178na7pqd5h9yxffcy78yaz7ykd4rmgi4c8ayk8";
2017-07-05 22:53:31 +01:00
};
# Fix a check which assumes that hook files are writeable by their
# owner.
patches = [
./fix-executable-check.patch
];
2017-09-03 14:38:28 +01:00
goPackagePath = "gitlab.com/gitlab-org/gitaly";
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
2019-07-16 00:17:38 +01:00
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ rubyEnv.wrappedRuby libgit2_0_27 ];
2019-07-16 00:17:38 +01:00
goDeps = ./deps.nix;
2020-09-28 22:42:57 +01:00
preBuild = "rm -rf go/src/gitlab.com/gitlab-org/labkit/vendor";
2017-09-03 14:38:28 +01:00
postInstall = ''
mkdir -p $ruby
cp -rv $src/ruby/{bin,lib,proto,git-hooks,gitlab-shell} $ruby
2017-07-05 22:53:31 +01:00
'';
outputs = [ "out" "ruby" ];
2017-09-03 14:38:28 +01:00
2017-07-05 22:53:31 +01: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 20:27:05 +00:00
maintainers = with maintainers; [ roblabla globin fpletz talyz ];
2017-07-05 22:53:31 +01:00
license = licenses.mit;
};
}