dasel: fix cross compilation

This commit is contained in:
Nikolay Korotkiy 2024-09-08 16:34:45 +04:00
parent e4d23274eb
commit baeb94d9cf
No known key found for this signature in database
GPG Key ID: D1DE6D7F693663A5

View File

@ -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