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-08-23 15:02:05 +02:00
nu-ver = "0.97.1";
in
2024-05-20 21:14:35 +02:00
{
options.nushell-plugins = lib.mkOption { };
config.nushell-plugins = [
(builtins.getFlake
2024-08-23 17:31:30 +02:00
"git+https://git.mzte.de/LordMZTE/nu-plugin-jobcontrol.git?rev=9ffb0e3b3d4415035b1406f3d2f981bd9ac09579"
).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-08-23 15:02:05 +02:00
version = "0.10.0";
2024-08-28 12:49:23 +02:00
src = pkgs.fetchCrate {
inherit version;
pname = "nu_plugin_dbus";
hash = "sha256-PrZ8iZIqcxzrtAVo8GnYQdbnbNphpJvqmd51/4UBF60=";
2024-05-20 21:14:35 +02:00
};
2024-08-23 15:02:05 +02:00
cargoHash = "sha256-0i5OxunUT1K3hP9n496SCXe24lry4ModkspGlphkmBI=";
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-08-23 15:02:05 +02:00
hash = "sha256-zXyaoEGlXTW0V2W5SRhaucOGG97iWyVsf+OXIEtcQZo=";
2024-05-20 21:14:35 +02:00
};
2024-08-23 15:02:05 +02:00
cargoHash = "sha256-M5H8BGCKLKkfSz9qQ24qvhA81jzri/ZyWg8xs/iwri0=";
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-08-23 15:02:05 +02:00
hash = "sha256-OQsQSXesLJyrWO/c4AfTmYcviUKpZNrL1BePa6wMcwk=";
2024-05-20 21:14:35 +02:00
};
2024-08-23 15:02:05 +02:00
cargoHash = "sha256-cqNGI40VjqAkpU/jTwXuHrZZ3wJxiDGVQVl2HTXmYqw=";
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-08-23 15:02:05 +02:00
hash = "sha256-6UQHxjWDp5ak4ouyru5K9VGt8JaIzArYgyJnqe5d0KA=";
2024-07-16 13:27:43 +02:00
};
2024-08-23 15:02:05 +02:00
cargoHash = "sha256-z2betxX5fgzPlr1+9/IZVSUyb/hjw+4C9DHYWUwoWRg=";
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
}