dotfiles/nix/nushell-plugins.nix

78 lines
2.3 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
2024-07-30 22:42:38 +02:00
nu-ver = "0.96.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=852ce5e15c4fb3e45cd9fdd36afcce0df293b92b"
).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";
2024-07-30 22:42:38 +02:00
version = "0.9.0";
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_dbus";
2024-07-30 22:42:38 +02:00
hash = "sha256-tIXwOuKAUhtFujChNtDHu8GnO+l+HbXiVZn5Ui7K4UE=";
2024-05-20 21:14:35 +02:00
};
2024-07-30 22:42:38 +02:00
cargoSha256 = "sha256-IDKTztcdBS4pMj/x85sEvvpe68RppnioJssQsRpDpp0=";
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";
2024-07-30 22:42:38 +02:00
hash = "sha256-UHGSctwyDfQfzUwK4+5gSGgx3rKM/ANZ7YwhGkZ9+KY=";
2024-05-20 21:14:35 +02:00
};
2024-07-30 22:42:38 +02:00
cargoSha256 = "sha256-SU3aeX/yYLXsD8ljQ4obAzAesSaxaI6RULfQQNR1bg4=";
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";
2024-07-30 22:42:38 +02:00
hash = "sha256-G+wjEzUeiJfKfO5KdrnOATqG2MmQxFaDjN7eEPKEmgo=";
2024-05-20 21:14:35 +02:00
};
2024-07-30 22:42:38 +02:00
cargoSha256 = "sha256-LNdfMpAar2OVGlQjTJKfsSC2WuxtIshEMPmHQDjzMYE=";
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";
2024-07-30 22:42:38 +02:00
hash = "sha256-APZC+sna64ptfxIcvXWto456Z7xuIxmzvxfCK1EbW+c=";
2024-07-16 13:27:43 +02:00
};
2024-07-30 22:42:38 +02:00
cargoSha256 = "sha256-5LACp9sF/Qc/1ORCXq34NTMZaMBThkvKsnTjR2+zCt0=";
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
}