5e9e1146e1
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
67 lines
1.6 KiB
Nix
67 lines
1.6 KiB
Nix
{ lib
|
|
, fetchFromGitLab
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, pkg-config
|
|
|
|
# libgit2 + dependencies
|
|
, libgit2
|
|
, http-parser
|
|
, openssl
|
|
, pcre
|
|
, zlib
|
|
}:
|
|
|
|
let
|
|
version = "16.1.3";
|
|
package_version = "v${lib.versions.major version}";
|
|
gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
|
|
|
|
commonOpts = {
|
|
inherit version;
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "gitlab-org";
|
|
repo = "gitaly";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-g9K1dFcrUkWJInPrwg9fz/TEK35GrjqFpUS2bnemwLQ=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-6oOFQGPwiMRQrESXsQsGzvWz9bCb0VTYIyyG/C2b3nA=";
|
|
|
|
ldflags = [ "-X ${gitaly_package}/internal/version.version=${version}" "-X ${gitaly_package}/internal/version.moduleVersion=${version}" ];
|
|
|
|
tags = [ "static,system_libgit2" ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ libgit2 openssl zlib pcre http-parser ];
|
|
|
|
doCheck = false;
|
|
};
|
|
|
|
auxBins = buildGoModule ({
|
|
pname = "gitaly-aux";
|
|
|
|
subPackages = [ "cmd/gitaly-hooks" "cmd/gitaly-ssh" "cmd/gitaly-git2go" "cmd/gitaly-lfs-smudge" ];
|
|
} // commonOpts);
|
|
in
|
|
buildGoModule ({
|
|
pname = "gitaly";
|
|
|
|
subPackages = [ "cmd/gitaly" "cmd/gitaly-backup" ];
|
|
|
|
preConfigure = ''
|
|
mkdir -p _build/bin
|
|
cp -r ${auxBins}/bin/* _build/bin
|
|
'';
|
|
|
|
outputs = [ "out" ];
|
|
|
|
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 ++ [ "x86_64-darwin" ];
|
|
maintainers = teams.gitlab.members;
|
|
license = licenses.mit;
|
|
};
|
|
} // commonOpts)
|