depot/third_party/nixpkgs/pkgs/tools/misc/zoxide/default.nix
Default email be14b713bb Project import generated by Copybara.
GitOrigin-RevId: e5cc06a1e806070693add4f231060a62b962fc44
2021-04-17 02:35:05 +02:00

36 lines
840 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, withFzf ? true
, fzf
, libiconv
}:
rustPlatform.buildRustPackage rec {
pname = "zoxide";
version = "0.6.0";
src = fetchFromGitHub {
owner = "ajeetdsouza";
repo = "zoxide";
rev = "v${version}";
sha256 = "ZeGFsVBpEhKi4EIhpQlCuriFzmHAgLYw3qE/zqfyqgU=";
};
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
postPatch = lib.optionalString withFzf ''
substituteInPlace src/fzf.rs \
--replace '"fzf"' '"${fzf}/bin/fzf"'
'';
cargoSha256 = "Hzn01+OhdBrZD1woXN4Pwf/S72Deln1gyyBOWyDC6iM=";
meta = with lib; {
description = "A fast cd command that learns your habits";
homepage = "https://github.com/ajeetdsouza/zoxide";
license = with licenses; [ mit ];
maintainers = with maintainers; [ ysndr cole-h SuperSandro2000 ];
};
}