yazi: append .yazi to plugin folders automatically (#413536)
This commit is contained in:
commit
f67b454f0b
@ -76,7 +76,7 @@ in
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
foo = ./foo;
|
||||
bar = pkgs.bar;
|
||||
inherit (pkgs.yaziPlugins) bar;
|
||||
}
|
||||
'';
|
||||
};
|
||||
@ -97,7 +97,7 @@ in
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
foo = ./foo;
|
||||
bar = pkgs.bar;
|
||||
inherit (pkgs.yaziPlugins) bar;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
@ -69,14 +69,20 @@ let
|
||||
mkdir $out/plugins
|
||||
${lib.optionalString (plugins != { }) ''
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: value: "ln -s ${value} $out/plugins/${name}") plugins
|
||||
lib.mapAttrsToList (
|
||||
name: value:
|
||||
"ln -s ${value} $out/plugins/${if lib.hasSuffix ".yazi" name then name else "${name}.yazi"}"
|
||||
) plugins
|
||||
)}
|
||||
''}
|
||||
|
||||
mkdir $out/flavors
|
||||
${lib.optionalString (flavors != { }) ''
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: value: "ln -s ${value} $out/flavors/${name}") flavors
|
||||
lib.mapAttrsToList (
|
||||
name: value:
|
||||
"ln -s ${value} $out/flavors/${if lib.hasSuffix ".yazi" name then name else "${name}.yazi"}"
|
||||
) flavors
|
||||
)}
|
||||
''}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user