git-town: fix cross build (#406782)

Changed files
+11 -8
pkgs
by-name
gi
git-town
+11 -8
pkgs/by-name/gi/git-town/package.nix
···
{
lib,
+
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
···
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
-
postInstall = ''
-
installShellCompletion --cmd git-town \
-
--bash <($out/bin/git-town completions bash) \
-
--fish <($out/bin/git-town completions fish) \
-
--zsh <($out/bin/git-town completions zsh)
-
-
wrapProgram $out/bin/git-town --prefix PATH : ${lib.makeBinPath [ git ]}
-
'';
+
postInstall =
+
lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+
installShellCompletion --cmd git-town \
+
--bash <($out/bin/git-town completions bash) \
+
--fish <($out/bin/git-town completions fish) \
+
--zsh <($out/bin/git-town completions zsh)
+
''
+
+ ''
+
wrapProgram $out/bin/git-town --prefix PATH : ${lib.makeBinPath [ git ]}
+
'';
passthru.tests.version = testers.testVersion {
package = git-town;