Unverified Commit 34df1dba authored by Stefan Frijters's avatar Stefan Frijters
Browse files

yara-x: only generate shell completions if possible

parent f32a8ac9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
{ 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) \