velero: use stdenv.buildPlatform.canExecute

This commit is contained in:
Peder Bergebakken Sundt 2024-10-21 11:34:21 +02:00
parent 2d992c6fdd
commit 56783f8200

View File

@ -31,7 +31,7 @@ buildGoModule rec {
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
$out/bin/velero completion bash > velero.bash
$out/bin/velero completion zsh > velero.zsh
installShellCompletion velero.{bash,zsh}