navi: make fzf optional

Navi also allows to configure Skim as finder
This commit is contained in:
Mario Rodas 2021-12-08 04:20:00 +00:00
parent 8f7f6fbf91
commit 42fb1714d7

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fzf, lib, makeWrapper, rustPlatform, wget, libiconv }:
{ stdenv, fetchFromGitHub, lib, makeWrapper, rustPlatform, wget, libiconv, withFzf ? true, fzf }:
rustPlatform.buildRustPackage rec {
pname = "navi";
@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
postInstall = ''
wrapProgram $out/bin/navi \
--prefix PATH : "$out/bin" \
--prefix PATH : ${lib.makeBinPath [ fzf wget ]}
--prefix PATH : ${lib.makeBinPath([ wget ] ++ lib.optionals withFzf [ fzf ])}
'';
checkFlags = [