2020-07-04 09:13:09 +02:00
|
|
|
{ lib
|
2020-03-30 03:51:05 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2020-07-04 09:13:09 +02:00
|
|
|
, withFzf ? true
|
|
|
|
, fzf
|
2020-03-30 03:51:05 +02:00
|
|
|
}:
|
2020-07-04 09:13:09 +02:00
|
|
|
let
|
|
|
|
version = "0.4.3";
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
2020-03-10 22:48:38 +01:00
|
|
|
pname = "zoxide";
|
2020-07-04 09:13:09 +02:00
|
|
|
inherit version;
|
2020-03-10 22:48:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ajeetdsouza";
|
|
|
|
repo = "zoxide";
|
|
|
|
rev = "v${version}";
|
2020-07-04 09:13:09 +02:00
|
|
|
sha256 = "1ghdal6pqkp56rqawhj26ch1x4cvnjj032xz3626aiddqgn134zj";
|
2020-03-10 22:48:38 +01:00
|
|
|
};
|
|
|
|
|
2020-07-04 09:13:09 +02:00
|
|
|
postPatch = lib.optionalString withFzf ''
|
2020-05-25 11:20:00 +02:00
|
|
|
substituteInPlace src/fzf.rs \
|
|
|
|
--replace '"fzf"' '"${fzf}/bin/fzf"'
|
|
|
|
'';
|
2020-03-10 22:48:38 +01:00
|
|
|
|
2020-07-04 09:13:09 +02:00
|
|
|
cargoSha256 = "0klnjmda77bq9i9f0rz48jzaw4rcf7hafcjjpb0i570d7hlxnwsr";
|
2020-03-10 22:48:38 +01:00
|
|
|
|
2020-07-04 09:13:09 +02:00
|
|
|
meta = with lib; {
|
2020-03-10 22:48:38 +01:00
|
|
|
description = "A fast cd command that learns your habits";
|
|
|
|
homepage = "https://github.com/ajeetdsouza/zoxide";
|
|
|
|
license = with licenses; [ mit ];
|
2020-03-19 21:21:46 +01:00
|
|
|
maintainers = with maintainers; [ ysndr cole-h ];
|
2020-03-10 22:48:38 +01:00
|
|
|
};
|
|
|
|
}
|