From 1ec182b767cf6ee0bd180c326efa36ea109b112b Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Thu, 24 Oct 2024 14:29:57 +0200 Subject: [PATCH] FIXME: gitaly: copy all gitaly-git binaries into the final binary --- .../version-management/gitlab/gitaly/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index f94dec73688fc..8539a95021484 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -11,6 +11,7 @@ let gitaly_package = "gitlab.com/gitlab-org/gitaly/${package_version}"; git = callPackage ./git.nix { }; + gitMajorMinor = lib.versions.majorMinor git.version; commonOpts = { inherit version; @@ -48,9 +49,10 @@ buildGoModule ({ cp -r ${auxBins}/bin/* _build/bin # gitaly embeds these git binaries in its own binary # https://gitlab.com/gitlab-org/gitaly/-/blob/10fd91391a7c30ca54ec81eea881740cfdee8b0a/Makefile#L122 - find ${git}/bin - for f in ${git}/bin/{git,git-remote-http,git-http-backend}; do - cp "$f" "_build/bin/gitaly-$(basename $f)"; + for f in ${git}/bin/gitaly-{git,git-remote-http,git-http-backend}-v${gitMajorMinor}; do + dest=''${f/#"${git}/bin/gitaly-"/} + dest=''${dest/%"-v${gitMajorMinor}"/} + cp -a $f _build/bin/$dest done '';