mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 11:05:14 +00:00
yara-x: only generate shell completions if possible
This commit is contained in:
parent
f32a8ac989
commit
34df1dba45
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user