11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
16 owner = "ajeetdsouza";
18 rev = "refs/tags/v${version}";
19 hash = "sha256-3XC5K4OlituoFMPN9yJkYi+tkH6M0KK5jVAGdr/GLd0=";
22 nativeBuildInputs = [ installShellFiles ];
24 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
26 postPatch = lib.optionalString withFzf ''
27 substituteInPlace src/util.rs \
28 --replace '"fzf"' '"${fzf}/bin/fzf"'
31 cargoHash = "sha256-ZRsnoLysNzDIi9hDOqwAzbxcyFQgn2Wv3gRNAjV5HfE=";
34 installManPage man/man*/*
35 installShellCompletion --cmd zoxide \
36 --bash contrib/completions/zoxide.bash \
37 --fish contrib/completions/zoxide.fish \
38 --zsh contrib/completions/_zoxide
42 description = "Fast cd command that learns your habits";
43 homepage = "https://github.com/ajeetdsouza/zoxide";
44 changelog = "https://github.com/ajeetdsouza/zoxide/blob/v${version}/CHANGELOG.md";
45 license = with licenses; [ mit ];
46 maintainers = with maintainers; [ ysndr cole-h SuperSandro2000 ];
47 mainProgram = "zoxide";