mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-15 08:34:04 +00:00
dasel: fix cross compilation (#340507)
This commit is contained in:
commit
e7a001e135
@ -1,4 +1,5 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
@ -23,14 +24,14 @@ buildGoModule rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
installShellCompletion --cmd dasel \
|
installShellCompletion --cmd dasel \
|
||||||
--bash <($out/bin/dasel completion bash) \
|
--bash <($out/bin/dasel completion bash) \
|
||||||
--fish <($out/bin/dasel completion fish) \
|
--fish <($out/bin/dasel completion fish) \
|
||||||
--zsh <($out/bin/dasel completion zsh)
|
--zsh <($out/bin/dasel completion zsh)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
runHook preInstallCheck
|
runHook preInstallCheck
|
||||||
if [[ $($out/bin/dasel --version) == "dasel version ${version}" ]]; then
|
if [[ $($out/bin/dasel --version) == "dasel version ${version}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user