mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
yazi: append .yazi to plugin folders automatically
This commit is contained in:
parent
8d3fffc313
commit
c4f3c2c742
2 changed files with 10 additions and 4 deletions
|
@ -76,7 +76,7 @@ in
|
||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
foo = ./foo;
|
foo = ./foo;
|
||||||
bar = pkgs.bar;
|
inherit (pkgs.yaziPlugins) bar;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -97,7 +97,7 @@ in
|
||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
foo = ./foo;
|
foo = ./foo;
|
||||||
bar = pkgs.bar;
|
inherit (pkgs.yaziPlugins) bar;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -69,14 +69,20 @@ let
|
||||||
mkdir $out/plugins
|
mkdir $out/plugins
|
||||||
${lib.optionalString (plugins != { }) ''
|
${lib.optionalString (plugins != { }) ''
|
||||||
${lib.concatStringsSep "\n" (
|
${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
|
mkdir $out/flavors
|
||||||
${lib.optionalString (flavors != { }) ''
|
${lib.optionalString (flavors != { }) ''
|
||||||
${lib.concatStringsSep "\n" (
|
${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