mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-11 20:43:00 +01:00
remove broken use nu plugins script
This commit is contained in:
parent
1396ca9a85
commit
d963f1a6b1
1 changed files with 2 additions and 10 deletions
|
@ -43,24 +43,16 @@
|
|||
config.packages.nushell-plugins =
|
||||
let
|
||||
pluginName = d: lib.removePrefix "nu-plugin-" d.name;
|
||||
|
||||
# This needs to be a separate file because `plugin use` is a parser keyword in Nu,
|
||||
# thus it would be evaluated before `plugin add` in `add-plugins.nu`.
|
||||
use-plugins-script = pkgs.writeTextFile {
|
||||
name = "use-plugins.nu";
|
||||
text = builtins.concatStringsSep "\n"
|
||||
(map (d: "plugin use ${pluginName d}") config.nushell-plugins);
|
||||
};
|
||||
in
|
||||
pkgs.writeTextFile {
|
||||
name = "add-plugins.nu";
|
||||
text = builtins.concatStringsSep "\n"
|
||||
((map
|
||||
(map
|
||||
(d:
|
||||
''
|
||||
if (plugin list | any { |p| $p.name == "${pluginName d}" }) { plugin rm ${pluginName d} }
|
||||
plugin add ${lib.getBin d}/bin/${builtins.replaceStrings ["-"] ["_"] d.name}
|
||||
'')
|
||||
config.nushell-plugins) ++ [ "source ${use-plugins-script}" ]);
|
||||
config.nushell-plugins);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue