2024-05-20 21:14:35 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
options.nushell-plugins = lib.mkOption { };
|
|
|
|
|
2024-11-15 12:47:46 +01:00
|
|
|
config.nushell-plugins = {
|
|
|
|
jobcontrol = (builtins.getFlake
|
|
|
|
"git+https://git.mzte.de/LordMZTE/nu-plugin-jobcontrol.git?rev=3a02910ff138691ecf3557722411e53261d900d4"
|
|
|
|
).outputs.packages.${pkgs.system}.default;
|
2024-07-31 09:47:56 +02:00
|
|
|
|
2024-11-15 12:47:46 +01:00
|
|
|
dbus = (pkgs.rustPlatform.buildRustPackage rec {
|
2024-05-20 21:14:35 +02:00
|
|
|
name = "nu-plugin-dbus";
|
2024-11-15 12:47:46 +01:00
|
|
|
version = "0.13.0";
|
|
|
|
#src = pkgs.fetchCrate {
|
|
|
|
# inherit version;
|
|
|
|
# pname = "nu_plugin_dbus";
|
|
|
|
# hash = "sha256-UBpqgw6qqcEDW5bbSWJ/aaSSbEG5B/D6nvcbokX8aeA=";
|
|
|
|
#};
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "LordMZTE";
|
|
|
|
repo = "nu_plugin_dbus";
|
|
|
|
rev = "a682d442cef12a84553c5fcd56c8f10f2cbda0e6";
|
|
|
|
hash = "sha256-BazLyxZ7h3C+8llr0SkdM5+o9HiDXHZMtIPJjY05n4E=";
|
2024-05-20 21:14:35 +02:00
|
|
|
};
|
|
|
|
|
2024-11-15 12:47:46 +01:00
|
|
|
cargoHash = "sha256-DxcOLycX4kjff+XgParpGjio+MxpEA5t0+9x7XHrKgU=";
|
2024-05-20 21:14:35 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
|
|
|
buildInputs = with pkgs; [ dbus ];
|
2024-11-15 12:47:46 +01:00
|
|
|
});
|
|
|
|
inherit (pkgs.nushellPlugins) polars formats query;
|
|
|
|
};
|
2024-05-20 21:14:35 +02:00
|
|
|
|
2024-07-22 18:12:31 +02:00
|
|
|
config.output.packages.nushell-plugins = pkgs.writeTextFile {
|
|
|
|
name = "add-plugins.nu";
|
|
|
|
text = builtins.concatStringsSep "\n"
|
2024-11-15 12:47:46 +01:00
|
|
|
(lib.mapAttrsToList
|
|
|
|
(name: d:
|
2024-07-22 18:12:31 +02:00
|
|
|
''
|
2024-11-15 12:47:46 +01:00
|
|
|
plugin add ${lib.getBin d}/bin/nu_plugin_${name}
|
2024-07-22 18:12:31 +02:00
|
|
|
'')
|
|
|
|
config.nushell-plugins);
|
|
|
|
};
|
2024-05-20 21:14:35 +02:00
|
|
|
}
|