Skip to content

Commit 407109e

Browse files
authored
yazi-unwrapped: add man pages (#383128)
2 parents 50e8d72 + 4be578e commit 407109e

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

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

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,34 @@
88
Foundation,
99
rust-jemalloc-sys,
1010
}:
11-
12-
rustPlatform.buildRustPackage rec {
13-
pname = "yazi";
11+
let
1412
version = "25.2.11";
1513

16-
src = fetchFromGitHub {
14+
code_src = fetchFromGitHub {
1715
owner = "sxyazi";
1816
repo = "yazi";
19-
rev = "v${version}";
17+
tag = "v${version}";
2018
hash = "sha256-yVpSoEmEA+/XF/jlJqKdkj86m8IZLAbrxDxz5ZnmP78=";
2119
};
2220

21+
man_src = fetchFromGitHub {
22+
name = "manpages"; # needed to ensure name is unique
23+
owner = "yazi-rs";
24+
repo = "manpages";
25+
rev = "8950e968f4a1ad0b83d5836ec54a070855068dbf";
26+
hash = "sha256-kEVXejDg4ChFoMNBvKlwdFEyUuTcY2VuK9j0PdafKus=";
27+
};
28+
in
29+
rustPlatform.buildRustPackage rec {
30+
pname = "yazi";
31+
inherit version;
32+
33+
srcs = [
34+
code_src
35+
man_src
36+
];
37+
sourceRoot = code_src.name;
38+
2339
useFetchCargoVendor = true;
2440
cargoHash = "sha256-AfXi68PNrYj6V6CYIPZT0t2l5KYTYrIzJgrcEPLW8FM=";
2541

@@ -36,6 +52,8 @@ rustPlatform.buildRustPackage rec {
3652
--fish ./yazi-boot/completions/yazi.fish \
3753
--zsh ./yazi-boot/completions/_yazi
3854
55+
installManPage ../${man_src.name}/yazi{.1,-config.5}
56+
3957
install -Dm444 assets/yazi.desktop -t $out/share/applications
4058
install -Dm444 assets/logo.png $out/share/pixmaps/yazi.png
4159
'';

0 commit comments

Comments
 (0)