2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
installShellFiles,
|
|
|
|
stdenv,
|
|
|
|
Foundation,
|
|
|
|
rust-jemalloc-sys,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nix-update-script,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "yazi";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.2.5";
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-RwkgJX4naD3t97ce4Zg/VWJ41QiVFFqDW5nHpyMtISY=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-qnbinuTuaPiD7ib3aCJzSwuA4s3naFzi+txqX7jkHIo=";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
env.YAZI_GEN_COMPLETIONS = true;
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# TODO: remove in the next release
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"-p"
|
|
|
|
"yazi-fm"
|
|
|
|
"-p"
|
|
|
|
"yazi-cli"
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2024-05-15 15:35:15 +00:00
|
|
|
buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ Foundation ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
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;
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
xyenon
|
|
|
|
matthiasbeyer
|
|
|
|
linsui
|
|
|
|
eljamm
|
|
|
|
];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "yazi";
|
|
|
|
};
|
|
|
|
}
|