88 Foundation ,
99 rust-jemalloc-sys ,
1010} :
11- let
11+ rustPlatform . buildRustPackage ( finalAttrs : {
12+ pname = "yazi" ;
1213 version = "25.2.26" ;
1314
14- code_src = fetchFromGitHub {
15- owner = "sxyazi" ;
16- repo = "yazi" ;
17- tag = "v${ version } " ;
18- hash = "sha256-DqhqpQRCSBTGonL9+bP7pA3mO2CemlbhwzShVdrL1/0=" ;
19- } ;
15+ srcs = builtins . attrValues finalAttrs . passthru . srcs ;
2016
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 ;
17+ sourceRoot = finalAttrs . passthru . srcs . code_src . name ;
3818
3919 useFetchCargoVendor = true ;
4020 cargoHash = "sha256-xg37aypFKY0ZG9GOkygTHlOAjqkTuhLNKo8Fz6MF2ZY=" ;
@@ -52,13 +32,29 @@ rustPlatform.buildRustPackage rec {
5232 --fish ./yazi-boot/completions/yazi.fish \
5333 --zsh ./yazi-boot/completions/_yazi
5434
55- installManPage ../${ man_src . name } /yazi{.1,-config.5}
35+ installManPage ../${ finalAttrs . passthru . srcs . man_src . name } /yazi{.1,-config.5}
5636
5737 install -Dm444 assets/yazi.desktop -t $out/share/applications
5838 install -Dm444 assets/logo.png $out/share/pixmaps/yazi.png
5939 '' ;
6040
6141 passthru . updateScript . command = [ ./update.sh ] ;
42+ passthru . srcs = {
43+ code_src = fetchFromGitHub {
44+ owner = "sxyazi" ;
45+ repo = "yazi" ;
46+ tag = "v${ finalAttrs . version } " ;
47+ hash = "sha256-DqhqpQRCSBTGonL9+bP7pA3mO2CemlbhwzShVdrL1/0=" ;
48+ } ;
49+
50+ man_src = fetchFromGitHub {
51+ name = "manpages" ; # needed to ensure name is unique
52+ owner = "yazi-rs" ;
53+ repo = "manpages" ;
54+ rev = "8950e968f4a1ad0b83d5836ec54a070855068dbf" ;
55+ hash = "sha256-kEVXejDg4ChFoMNBvKlwdFEyUuTcY2VuK9j0PdafKus=" ;
56+ } ;
57+ } ;
6258
6359 meta = {
6460 description = "Blazing fast terminal file manager written in Rust, based on async I/O" ;
@@ -74,4 +70,4 @@ rustPlatform.buildRustPackage rec {
7470 ] ;
7571 mainProgram = "yazi" ;
7672 } ;
77- }
73+ } )
0 commit comments