blob: 3245be8f3144700da71c074078071bc2283ac404 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{
rustPlatform,
fetchFromGitHub,
lib,
installShellFiles,
stdenv,
Foundation,
rust-jemalloc-sys,
}:
rustPlatform.buildRustPackage rec {
pname = "yazi";
version = "0.3.3";
src = fetchFromGitHub {
owner = "sxyazi";
repo = "yazi";
rev = "v${version}";
hash = "sha256-bTDf8muJN0G4+c6UagtWgNLlmGN15twEBjdmKEP0bCE=";
};
cargoHash = "sha256-8UsdanF8y4uFoXdC7aAw7pVFRd9GACcfVvqkUtFmN5k=";
env.YAZI_GEN_COMPLETIONS = true;
env.VERGEN_GIT_SHA = "Nixpkgs";
env.VERGEN_BUILD_DATE = "2024-09-04";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ Foundation ];
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
'';
passthru.updateScript.command = [ ./update.sh ];
meta = {
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
linsui
eljamm
uncenter
];
mainProgram = "yazi";
};
}
|