cri-tools: fix cross compilation

This commit is contained in:
Nick Cao 2024-07-27 15:33:19 -04:00
parent 08e37800ff
commit 67adae7a86
No known key found for this signature in database

View File

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
@ -30,11 +31,12 @@ buildGoModule rec {
installPhase = ''
runHook preInstall
make install BINDIR=$out/bin
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for shell in bash fish zsh; do
$out/bin/crictl completion $shell > crictl.$shell
installShellCompletion crictl.$shell
installShellCompletion --cmd crictl \
--$shell <($out/bin/crictl completion $shell)
done
'' + ''
runHook postInstall
'';