git-town: fix cross build (#406782)

This commit is contained in:
Ben Siraphob
2025-05-14 00:10:46 -04:00
committed by GitHub

View File

@@ -1,5 +1,6 @@
{ {
lib, lib,
stdenv,
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
installShellFiles, installShellFiles,
@@ -64,14 +65,16 @@ buildGoModule rec {
in in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
postInstall = '' postInstall =
installShellCompletion --cmd git-town \ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
--bash <($out/bin/git-town completions bash) \ installShellCompletion --cmd git-town \
--fish <($out/bin/git-town completions fish) \ --bash <($out/bin/git-town completions bash) \
--zsh <($out/bin/git-town completions zsh) --fish <($out/bin/git-town completions fish) \
--zsh <($out/bin/git-town completions zsh)
wrapProgram $out/bin/git-town --prefix PATH : ${lib.makeBinPath [ git ]} ''
''; + ''
wrapProgram $out/bin/git-town --prefix PATH : ${lib.makeBinPath [ git ]}
'';
passthru.tests.version = testers.testVersion { passthru.tests.version = testers.testVersion {
package = git-town; package = git-town;