depot/third_party/nixpkgs/pkgs/by-name/gi/gitaly/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

85 lines
1.7 KiB
Nix

{
lib,
callPackage,
fetchFromGitLab,
buildGoModule,
pkg-config,
}:
let
version = "17.9.1";
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-xgNuU4m+19+FXZkL2ROx+BdyQu6cE2A7Jq2PFLNhGxc=";
};
vendorHash = "sha256-ZPxlv8jc3VWS1XzIyXs3W3aCxdTiDl8+Wx82exuYBDY=";
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
for f in ${git}/bin/git-*; do
cp "$f" "_build/bin/gitaly-$(basename $f)";
done
'';
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
)