44 runtimePaths = [ file ] ++ optionalDeps ++ extraPackages;
46 settingsFormat = formats.toml { };
55 if (settings == { } && initLua == null && plugins == { } && flavors == { }) then
58 runCommand "YAZI_CONFIG_HOME" { } ''
60 ${lib.concatMapStringsSep "\n" (
62 lib.optionalString (settings ? ${name} && settings.${name} != { }) ''
63 ln -s ${settingsFormat.generate "${name}.toml" settings.${name}} $out/${name}.toml
68 ${lib.optionalString (plugins != { }) ''
69 ${lib.concatStringsSep "\n" (
70 lib.mapAttrsToList (name: value: "ln -s ${value} $out/plugins/${name}") plugins
75 ${lib.optionalString (flavors != { }) ''
76 ${lib.concatStringsSep "\n" (
77 lib.mapAttrsToList (name: value: "ln -s ${value} $out/flavors/${name}") flavors
82 ${lib.optionalString (initLua != null) "ln -s ${initLua} $out/init.lua"}
85 runCommand yazi-unwrapped.name
87 inherit (yazi-unwrapped) pname version meta;
89 nativeBuildInputs = [ makeWrapper ];
93 ln -s ${yazi-unwrapped}/share $out/share
94 ln -s ${yazi-unwrapped}/bin/ya $out/bin/ya
95 makeWrapper ${yazi-unwrapped}/bin/yazi $out/bin/yazi \
96 --prefix PATH : ${lib.makeBinPath runtimePaths} \
97 ${lib.optionalString (configHome != null) "--set YAZI_CONFIG_HOME ${configHome}"}