dotfiles/nix/nushell-plugins.nix

85 lines
2.5 KiB
Nix
Raw Normal View History

2024-05-20 21:14:35 +02:00
{ config, lib, pkgs, ... }:
2024-07-16 13:27:43 +02:00
let
nu-ver = "0.98.0";
in
2024-05-20 21:14:35 +02:00
{
options.nushell-plugins = lib.mkOption { };
config.nushell-plugins = [
(builtins.getFlake
"git+https://git.mzte.de/LordMZTE/nu-plugin-jobcontrol.git?rev=40127dfa0573e0cc6c273d291f5423aa5964d76a"
).outputs.packages.${pkgs.system}.default
2024-07-16 13:27:43 +02:00
(pkgs.rustPlatform.buildRustPackage rec {
2024-05-20 21:14:35 +02:00
name = "nu-plugin-dbus";
version = "0.11.0";
#src = pkgs.fetchCrate {
# inherit version;
# pname = "nu_plugin_dbus";
# hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
#};
src = pkgs.fetchFromGitHub {
# Updated Fork
owner = "Canvis-Me";
repo = "nu_plugin_dbus";
rev = "a0f8eb54355e4fbf121f5f8a0a7e7d67b07e33bd";
hash = "sha256-CrTVLbD7Q/swDCxiWcqoxkB8X6ydfxhTAZjoT0SoB4I=";
2024-05-20 21:14:35 +02:00
};
cargoHash = "sha256-zyoZc+ItEiWMBeu8Ulbn2lAzFH2DeBbP7Rs+QLsBo+Y=";
2024-05-20 21:14:35 +02:00
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [ dbus ];
})
2024-07-16 13:27:43 +02:00
(pkgs.rustPlatform.buildRustPackage rec {
2024-05-20 21:14:35 +02:00
name = "nu-plugin-formats";
2024-07-16 13:27:43 +02:00
version = nu-ver;
2024-05-20 21:14:35 +02:00
src = pkgs.fetchCrate {
2024-07-16 13:27:43 +02:00
inherit version;
2024-05-20 21:14:35 +02:00
pname = "nu_plugin_formats";
hash = "sha256-/RJLHFlgKbshNeEF8YHdthZWTnJ8p1M2Xb1AJ44VvGs=";
2024-05-20 21:14:35 +02:00
};
cargoHash = "sha256-FIqE8u8RBVhGUvssRGLhH7kNvEfQFkYLDujTVT4liNA=";
2024-05-20 21:14:35 +02:00
})
2024-07-16 13:27:43 +02:00
(pkgs.rustPlatform.buildRustPackage rec {
2024-05-20 21:14:35 +02:00
name = "nu-plugin-polars";
2024-07-16 13:27:43 +02:00
version = nu-ver;
2024-05-20 21:14:35 +02:00
src = pkgs.fetchCrate {
2024-07-16 13:27:43 +02:00
inherit version;
2024-05-20 21:14:35 +02:00
pname = "nu_plugin_polars";
hash = "sha256-qG7popu37L60+N0C6ayvvQKVfDaZiE5G9JXTK4unY/w=";
2024-05-20 21:14:35 +02:00
};
cargoHash = "sha256-TvE5qJl+TQRhk0Q08zO37bLoJkVpQ5i0DAcnGwzNWzM=";
2024-05-20 21:14:35 +02:00
doCheck = false; # Needs OpenSSL, which build doesn't for some reason.
})
2024-07-16 13:27:43 +02:00
(pkgs.rustPlatform.buildRustPackage rec {
name = "nu-plugin-query";
version = nu-ver;
src = pkgs.fetchCrate {
inherit version;
pname = "nu_plugin_query";
hash = "sha256-ZY/rrahYg1gYjq1qsaQ34JQXd0PzWt3h5XqCMFaoanE=";
2024-07-16 13:27:43 +02:00
};
cargoHash = "sha256-ieFwg/Y/FuO2Rq6cjc6eyskV8/MzBWJVaFSGdwb53qA=";
2024-07-30 22:42:38 +02:00
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [ openssl ];
2024-07-16 13:27:43 +02:00
})
2024-05-20 21:14:35 +02:00
];
config.output.packages.nushell-plugins = pkgs.writeTextFile {
name = "add-plugins.nu";
text = builtins.concatStringsSep "\n"
(map
(d:
''
plugin add ${lib.getBin d}/bin/${builtins.replaceStrings ["-"] ["_"] d.name}
'')
config.nushell-plugins);
};
2024-05-20 21:14:35 +02:00
}