From baeb94d9cf6d570d7b729188a88a7406a9e63014 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 8 Sep 2024 16:34:45 +0400 Subject: [PATCH] dasel: fix cross compilation --- pkgs/applications/misc/dasel/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/dasel/default.nix b/pkgs/applications/misc/dasel/default.nix index 26ea5f2cad0b..f135a39a41e6 100644 --- a/pkgs/applications/misc/dasel/default.nix +++ b/pkgs/applications/misc/dasel/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildGoModule , fetchFromGitHub , installShellFiles @@ -23,14 +24,14 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - postInstall = '' + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd dasel \ --bash <($out/bin/dasel completion bash) \ --fish <($out/bin/dasel completion fish) \ --zsh <($out/bin/dasel completion zsh) ''; - doInstallCheck = true; + doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; installCheckPhase = '' runHook preInstallCheck if [[ $($out/bin/dasel --version) == "dasel version ${version}" ]]; then