delta: fix cross compilation (#543322)

This commit is contained in:
zowoq
2026-07-19 00:11:52 +00:00
committed by GitHub
+12 -6
View File
@@ -1,6 +1,7 @@
{
lib,
rustPlatform,
buildPackages,
fetchFromGitHub,
installShellFiles,
pkg-config,
@@ -42,12 +43,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
RUSTONIG_SYSTEM_LIBONIG = true;
};
postInstall = ''
installShellCompletion --cmd delta \
--bash <($out/bin/delta --generate-completion bash) \
--fish <($out/bin/delta --generate-completion fish) \
--zsh <($out/bin/delta --generate-completion zsh)
'';
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
installShellCompletion --cmd delta \
--bash <(${emulator} $out/bin/delta --generate-completion bash) \
--fish <(${emulator} $out/bin/delta --generate-completion fish) \
--zsh <(${emulator} $out/bin/delta --generate-completion zsh)
''
);
# test_env_parsing_with_pager_set_to_bat sets environment variables,
# which can be flaky with multiple threads: