2024-05-20 21:14:35 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
options.nushell-plugins = lib.mkOption { };
|
|
|
|
|
|
|
|
config.nushell-plugins = [
|
|
|
|
(pkgs.rustPlatform.buildRustPackage {
|
|
|
|
name = "nu-plugin-dbus";
|
|
|
|
src = pkgs.fetchCrate {
|
|
|
|
pname = "nu_plugin_dbus";
|
2024-06-11 01:18:55 +02:00
|
|
|
version = "0.7.0";
|
|
|
|
hash = "sha256-Xw8/8ROem+9fTRwFxr4p1ZKFVdRnsUwFhmyu87OylKY=";
|
2024-05-20 21:14:35 +02:00
|
|
|
};
|
|
|
|
|
2024-06-11 01:18:55 +02:00
|
|
|
cargoSha256 = "sha256-Rg6YCPUPib2U9FHHgKrTPyyWblj9QEbiKmQom3MpXPU=";
|
2024-05-20 21:14:35 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
|
|
|
buildInputs = with pkgs; [ dbus ];
|
|
|
|
})
|
|
|
|
(pkgs.rustPlatform.buildRustPackage {
|
|
|
|
name = "nu-plugin-formats";
|
|
|
|
src = pkgs.fetchCrate {
|
|
|
|
pname = "nu_plugin_formats";
|
2024-06-11 01:18:55 +02:00
|
|
|
version = "0.94.2";
|
|
|
|
hash = "sha256-MqE6iD8MjavdSIxGZFGtuuzjZFcwtW7upFBlwOR08+o=";
|
2024-05-20 21:14:35 +02:00
|
|
|
};
|
|
|
|
|
2024-06-11 01:18:55 +02:00
|
|
|
cargoSha256 = "sha256-7EBD4WtKHRX+34fao3oXOlb1UPpejxEL6Vagy9iH92I=";
|
2024-05-20 21:14:35 +02:00
|
|
|
})
|
|
|
|
(pkgs.rustPlatform.buildRustPackage {
|
|
|
|
name = "nu-plugin-polars";
|
|
|
|
src = pkgs.fetchCrate {
|
|
|
|
pname = "nu_plugin_polars";
|
2024-06-11 01:18:55 +02:00
|
|
|
version = "0.94.2";
|
|
|
|
hash = "sha256-rSwJImUi9k+MLPKaBxgV8UU1gTWoxCJHAtkUtYVvbyA=";
|
2024-05-20 21:14:35 +02:00
|
|
|
};
|
|
|
|
|
2024-06-11 01:18:55 +02:00
|
|
|
cargoSha256 = "sha256-llJGgqaoM1fJ9bdA0ohlf/TQqYOWjrl1RoONgSeTDHo=";
|
2024-05-20 21:14:35 +02:00
|
|
|
|
|
|
|
doCheck = false; # Needs OpenSSL, which build doesn't for some reason.
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-05-20 22:35:05 +02:00
|
|
|
config.packages.nushell-plugins =
|
|
|
|
let
|
|
|
|
pluginName = d: lib.removePrefix "nu-plugin-" d.name;
|
|
|
|
in
|
|
|
|
pkgs.writeTextFile {
|
|
|
|
name = "add-plugins.nu";
|
|
|
|
text = builtins.concatStringsSep "\n"
|
2024-05-27 11:59:20 +02:00
|
|
|
(map
|
2024-05-20 22:35:05 +02:00
|
|
|
(d:
|
|
|
|
''
|
|
|
|
if (plugin list | any { |p| $p.name == "${pluginName d}" }) { plugin rm ${pluginName d} }
|
|
|
|
plugin add ${lib.getBin d}/bin/${builtins.replaceStrings ["-"] ["_"] d.name}
|
|
|
|
'')
|
2024-05-27 11:59:20 +02:00
|
|
|
config.nushell-plugins);
|
2024-05-20 22:35:05 +02:00
|
|
|
};
|
2024-05-20 21:14:35 +02:00
|
|
|
}
|