2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitLab
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "16.7.2";
|
2022-06-26 10:26:21 +00:00
|
|
|
package_version = "v${lib.versions.major version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
commonOpts = {
|
|
|
|
inherit version;
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "gitlab-org";
|
|
|
|
repo = "gitaly";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-3R7x8eaUJqJ1mKlQ4kYThKyaSfSaow7lGx5EfNo+GNY=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
vendorHash = "sha256-btWHZMy1aBSsUVs30IqrdBCO79XQvTMXxkxYURF2Nqs=";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
ldflags = [ "-X ${gitaly_package}/internal/version.version=${version}" "-X ${gitaly_package}/internal/version.moduleVersion=${version}" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
tags = [ "static" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
auxBins = buildGoModule ({
|
|
|
|
pname = "gitaly-aux";
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
subPackages = [ "cmd/gitaly-hooks" "cmd/gitaly-ssh" "cmd/gitaly-lfs-smudge" "cmd/gitaly-gpg" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
} // commonOpts);
|
|
|
|
in
|
|
|
|
buildGoModule ({
|
|
|
|
pname = "gitaly";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
subPackages = [ "cmd/gitaly" "cmd/gitaly-backup" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p _build/bin
|
|
|
|
cp -r ${auxBins}/bin/* _build/bin
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
outputs = [ "out" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://gitlab.com/gitlab-org/gitaly";
|
|
|
|
description = "A Git RPC service for handling all the git calls made by GitLab";
|
2021-12-19 01:06:50 +00:00
|
|
|
platforms = platforms.linux ++ [ "x86_64-darwin" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = teams.gitlab.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
} // commonOpts)
|