commit
705b159498
|
@ -1,11 +1,20 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, withFzf ? true
|
, withFzf ? true
|
||||||
, fzf
|
, fzf
|
||||||
|
|
||||||
|
# checkInputs
|
||||||
|
, fish
|
||||||
|
, powershell
|
||||||
|
, shellcheck
|
||||||
|
, shfmt
|
||||||
|
, xonsh
|
||||||
|
, zsh
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "0.4.3";
|
version = "0.5.0";
|
||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage {
|
||||||
pname = "zoxide";
|
pname = "zoxide";
|
||||||
|
@ -15,15 +24,32 @@ rustPlatform.buildRustPackage {
|
||||||
owner = "ajeetdsouza";
|
owner = "ajeetdsouza";
|
||||||
repo = "zoxide";
|
repo = "zoxide";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1ghdal6pqkp56rqawhj26ch1x4cvnjj032xz3626aiddqgn134zj";
|
sha256 = "143lh94mw31pm9q7ib63h2k842g3h222mdabhf25hpb19lka2w5y";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# tests are broken on darwin
|
||||||
|
doCheck = !stdenv.isDarwin;
|
||||||
|
|
||||||
|
# fish needs a writable HOME for whatever reason
|
||||||
|
preCheck = ''
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
fish
|
||||||
|
powershell
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
|
xonsh
|
||||||
|
zsh
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = lib.optionalString withFzf ''
|
postPatch = lib.optionalString withFzf ''
|
||||||
substituteInPlace src/fzf.rs \
|
substituteInPlace src/fzf.rs \
|
||||||
--replace '"fzf"' '"${fzf}/bin/fzf"'
|
--replace '"fzf"' '"${fzf}/bin/fzf"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cargoSha256 = "0klnjmda77bq9i9f0rz48jzaw4rcf7hafcjjpb0i570d7hlxnwsr";
|
cargoSha256 = "05mp101yk1zkjj1gwbkldizq6f9f8089gqgvq42c4ngq88pc7v9a";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A fast cd command that learns your habits";
|
description = "A fast cd command that learns your habits";
|
||||||
|
|
Loading…
Reference in New Issue