mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
yazi: append .yazi to plugin folders automatically (#413536)
This commit is contained in:
commit
f67b454f0b
2 changed files with 10 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue