depot/third_party/nixpkgs/pkgs/applications/version-management/gitlab/gitaly/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

60 lines
1.5 KiB
Nix

{ lib
, fetchFromGitLab
, fetchFromGitHub
, buildGoModule
, pkg-config
}:
let
version = "16.7.2";
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-3R7x8eaUJqJ1mKlQ4kYThKyaSfSaow7lGx5EfNo+GNY=";
};
vendorHash = "sha256-btWHZMy1aBSsUVs30IqrdBCO79XQvTMXxkxYURF2Nqs=";
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)