depot/third_party/nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

59 lines
1.4 KiB
Nix

{ lib
, fetchFromGitLab
, buildGoModule
, pkg-config
}:
let
version = "16.10.6";
package_version = "v${lib.versions.major version}";
gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
commonOpts = {
inherit version;
# nixpkgs-update: no auto update
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
hash = "sha256-C57p3H1L6ZQfjipGoQJup8u6ofir3rrxORtzUA1afL0=";
};
vendorHash = "sha256-6gZr0/0ZGcFwwAY4IuW2puL/7akMZvaU0ONJGYyyJas=";
ldflags = [ "-X ${gitaly_package}/internal/version.version=${version}" "-X ${gitaly_package}/internal/version.moduleVersion=${version}" ];
tags = [ "static" ];
nativeBuildInputs = [ pkg-config ];
doCheck = false;
};
auxBins = buildGoModule ({
pname = "gitaly-aux";
subPackages = [ "cmd/gitaly-hooks" "cmd/gitaly-ssh" "cmd/gitaly-lfs-smudge" "cmd/gitaly-gpg" ];
} // 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)