From b3dabf3fa33158f75451ce183ac160681a98d10a Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sat, 13 Aug 2022 20:26:18 +0800 Subject: [PATCH] velero: disable shell completion generation when cross compiling --- pkgs/applications/networking/cluster/velero/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/velero/default.nix b/pkgs/applications/networking/cluster/velero/default.nix index f5672820601d..a25d8d504bcf 100644 --- a/pkgs/applications/networking/cluster/velero/default.nix +++ b/pkgs/applications/networking/cluster/velero/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "velero"; @@ -31,7 +31,7 @@ buildGoModule rec { ''; nativeBuildInputs = [ installShellFiles ]; - postInstall = '' + postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' $out/bin/velero completion bash > velero.bash $out/bin/velero completion zsh > velero.zsh installShellCompletion velero.{bash,zsh}