depot/third_party/nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

64 lines
1.5 KiB
Nix

{ lib
, callPackage
, fetchFromGitLab
, buildGoModule
, pkg-config
}:
let
version = "17.2.5";
package_version = "v${lib.versions.major version}";
gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
git = callPackage ./git.nix { };
commonOpts = {
inherit version;
# nixpkgs-update: no auto update
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "gitaly";
rev = "v${version}";
hash = "sha256-R6GmIBU7rzLBsegcXPjc9Dxp9qe3tP6unqOsnyiozgw=";
};
vendorHash = "sha256-FqnGVRldhevJgBBvJcvGXzRaYWqSHzZiXIQmCNzJv+4=";
ldflags = [ "-X ${gitaly_package}/internal/version.version=${version}" "-X ${gitaly_package}/internal/version.moduleVersion=${version}" ];
tags = [ "static" ];
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" ];
passthru = {
inherit git;
};
meta = with lib; {
homepage = "https://gitlab.com/gitlab-org/gitaly";
description = "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)