gomod2nix: Only generate completions if we are not cross compiling

This commit is contained in:
adisbladis 2022-06-14 05:26:36 +08:00
parent d404767bec
commit f8646af3f2

View file

@ -20,7 +20,7 @@ buildGoApplication {
nativeBuildInputs = [ makeWrapper installShellFiles ]; nativeBuildInputs = [ makeWrapper installShellFiles ];
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.targetPlatform) '' postInstall = lib.optionalString (stdenv.buildPlatform == stdenv.targetPlatform) ''
$out/bin/gomod2nix completion bash > gomod2nix.bash $out/bin/gomod2nix completion bash > gomod2nix.bash
$out/bin/gomod2nix completion fish > gomod2nix.fish $out/bin/gomod2nix completion fish > gomod2nix.fish
$out/bin/gomod2nix completion zsh > _gomod2nix $out/bin/gomod2nix completion zsh > _gomod2nix