38a4af7d19
CI Token Access Control An authorization issue discovered in the mirroring logic allowed read access to private repositories. This issue is now mitigated in the latest release and is waiting for a CVE ID to be assigned. https://about.gitlab.com/releases/2020/06/10/critical-security-release-13-0-6-released/
64 lines
1.6 KiB
Nix
64 lines
1.6 KiB
Nix
{ stdenv, fetchFromGitLab, fetchFromGitHub, buildGoPackage, 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 buildGoPackage rec {
|
|
version = "13.0.6";
|
|
pname = "gitaly";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "gitlab-org";
|
|
repo = "gitaly";
|
|
rev = "v${version}";
|
|
sha256 = "14vp73z9f0p3m1bjykkfzrmw9miyjxiqm79rns477xbm2dbmwa4s";
|
|
};
|
|
|
|
# Fix a check which assumes that hook files are writeable by their
|
|
# owner.
|
|
patches = [
|
|
./fix-executable-check.patch
|
|
];
|
|
|
|
goPackagePath = "gitlab.com/gitlab-org/gitaly";
|
|
|
|
passthru = {
|
|
inherit rubyEnv;
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [ rubyEnv.wrappedRuby libgit2_0_27 ];
|
|
goDeps = ./deps.nix;
|
|
preBuild = "rm -r go/src/gitlab.com/gitlab-org/labkit/vendor";
|
|
|
|
postInstall = ''
|
|
mkdir -p $ruby
|
|
cp -rv $src/ruby/{bin,lib,proto,git-hooks,gitlab-shell} $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;
|
|
};
|
|
}
|