2024-02-29 20:09:43 +00:00
|
|
|
{ rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
|
|
|
|
, installShellFiles
|
|
|
|
, stdenv
|
|
|
|
, Foundation
|
|
|
|
|
|
|
|
, nix-update-script
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "yazi";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.2.4";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sxyazi";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "yazi";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-c8fWWCOVBqQVdQch9BniCaJPrVEOCv35lLH8/hMIbvE=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoHash = "sha256-VeDyO+KCD3Axse4iPIoRxIvoAn3L33e2ObBZFV/REeg=";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
env.YAZI_GEN_COMPLETIONS = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Foundation ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd yazi \
|
2024-04-21 15:54:59 +00:00
|
|
|
--bash ./yazi-boot/completions/yazi.bash \
|
|
|
|
--fish ./yazi-boot/completions/yazi.fish \
|
|
|
|
--zsh ./yazi-boot/completions/_yazi
|
|
|
|
|
|
|
|
install -Dm444 assets/yazi.desktop -t $out/share/applications
|
|
|
|
install -Dm444 assets/logo.png $out/share/pixmaps/yazi.png
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
meta = {
|
2024-02-29 20:09:43 +00:00
|
|
|
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
|
|
|
|
homepage = "https://github.com/sxyazi/yazi";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ xyenon matthiasbeyer ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "yazi";
|
|
|
|
};
|
|
|
|
}
|