Merge pull request #325485 from SFrijters/yara-x-completions

yara-x: only generate shell completions if possible
This commit is contained in:
Thomas Gerbet 2024-07-08 19:03:37 +02:00 committed by GitHub
commit a7e7375441
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, cmake
@ -22,7 +23,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ cmake installShellFiles ];
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd yr \
--bash <($out/bin/yr completion bash) \
--fish <($out/bin/yr completion fish) \