zoxide: make fzf optional
This commit is contained in:
parent
82fbcf6ac3
commit
204ea0bfb7
|
@ -1,7 +1,7 @@
|
||||||
{ lib
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, fzf
|
, withFzf ? true, fzf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -15,13 +15,14 @@ rustPlatform.buildRustPackage rec {
|
||||||
sha256 = "1zfk9y5f12h2d5zwf2z8c95xwhbhc6ayv971875fbxgz1nd8vqb6";
|
sha256 = "1zfk9y5f12h2d5zwf2z8c95xwhbhc6ayv971875fbxgz1nd8vqb6";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
postPatch = stdenv.lib.optionalString withFzf ''
|
||||||
fzf
|
substituteInPlace src/fzf.rs \
|
||||||
];
|
--replace '"fzf"' '"${fzf}/bin/fzf"'
|
||||||
|
'';
|
||||||
|
|
||||||
cargoSha256 = "0z0p3cxxazw19bmk3zw7z2q93p00ywsa2cz1jhy78mn5pq1v95rd";
|
cargoSha256 = "0z0p3cxxazw19bmk3zw7z2q93p00ywsa2cz1jhy78mn5pq1v95rd";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A fast cd command that learns your habits";
|
description = "A fast cd command that learns your habits";
|
||||||
homepage = "https://github.com/ajeetdsouza/zoxide";
|
homepage = "https://github.com/ajeetdsouza/zoxide";
|
||||||
license = with licenses; [ mit ];
|
license = with licenses; [ mit ];
|
||||||
|
|
Loading…
Reference in a new issue