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.

59 lines
1.4 KiB
Nix
Raw Normal View History

2024-07-03 08:27:18 +00:00
{
rustPlatform,
fetchFromGitHub,
lib,
2024-02-18 15:24:18 +00:00
2024-07-03 08:27:18 +00:00
installShellFiles,
stdenv,
Foundation,
rust-jemalloc-sys,
2024-02-18 15:24:18 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "yazi";
2024-09-04 18:46:01 +00:00
version = "0.3.3";
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-09-04 18:46:01 +00:00
hash = "sha256-bTDf8muJN0G4+c6UagtWgNLlmGN15twEBjdmKEP0bCE=";
2024-02-18 15:24:18 +00:00
};
2024-09-04 18:46:01 +00:00
cargoHash = "sha256-8UsdanF8y4uFoXdC7aAw7pVFRd9GACcfVvqkUtFmN5k=";
2024-02-18 15:24:18 +00:00
env.YAZI_GEN_COMPLETIONS = true;
env.VERGEN_GIT_SHA = "Nixpkgs";
2024-09-04 18:46:01 +00:00
env.VERGEN_BUILD_DATE = "2024-09-04";
2024-02-18 15:24:18 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.hostPlatform.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.command = [ ./update.sh ];
2024-02-18 15:24:18 +00:00
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;
2024-07-03 08:27:18 +00:00
maintainers = with lib.maintainers; [
eljamm
khaneliman
linsui
matthiasbeyer
uncenter
xyenon
2024-07-03 08:27:18 +00:00
];
2024-02-18 15:24:18 +00:00
mainProgram = "yazi";
};
}