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
+2 -1
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) \