nixpkgs/pkgs/by-name/ya/yazi-unwrapped/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
Nix
Raw Normal View History

2024-02-18 15:24:18 +00:00
{ rustPlatform
, fetchFromGitHub
, lib
, installShellFiles
, stdenv
, Foundation
2024-04-22 12:42:13 +00:00
, rust-jemalloc-sys
2024-02-18 15:24:18 +00:00
, nix-update-script
}:
rustPlatform.buildRustPackage rec {
pname = "yazi";
2024-04-23 21:07:44 +00:00
version = "0.2.5";
2024-02-18 15:24:18 +00:00
src = fetchFromGitHub {
owner = "sxyazi";
2024-04-02 21:44:09 +00:00
repo = "yazi";
2024-02-18 15:24:18 +00:00
rev = "v${version}";
2024-04-23 21:07:44 +00:00
hash = "sha256-RwkgJX4naD3t97ce4Zg/VWJ41QiVFFqDW5nHpyMtISY=";
2024-02-18 15:24:18 +00:00
};
2024-04-23 21:07:44 +00:00
cargoHash = "sha256-qnbinuTuaPiD7ib3aCJzSwuA4s3naFzi+txqX7jkHIo=";
2024-02-18 15:24:18 +00:00
env.YAZI_GEN_COMPLETIONS = true;
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ Foundation ];
2024-02-18 15:24:18 +00:00
postInstall = ''
installShellCompletion --cmd yazi \
--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-18 15:24:18 +00:00
'';
passthru.updateScript = nix-update-script { };
meta = {
2024-02-18 15:24:18 +00:00
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
homepage = "https://github.com/sxyazi/yazi";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xyenon matthiasbeyer ];
2024-02-18 15:24:18 +00:00
mainProgram = "yazi";
};
}