nushell: get formats plugin from nixpkgs

This commit is contained in:
Erwin Boskma 2023-09-29 11:50:50 +02:00
parent 345e0ec853
commit 0c53e0aedb
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg
2 changed files with 1 additions and 41 deletions

View file

@ -2,12 +2,6 @@
with lib;
let
cfg = config.eboskma.programs.nushell;
nushell_plugin_formats = pkgs.callPackage ./plugin-formats.nix {
inherit (pkgs) stdenv lib rustPlatform;
inherit (pkgs.darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation;
nushell = config.programs.nushell.package;
};
in
{
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
@ -32,7 +26,7 @@ in
$env.LS_COLORS = (${pkgs.vivid}/bin/vivid generate gruvbox-dark | str trim)
register ${pkgs.nushellPlugins.query}/bin/nu_plugin_query
register ${nushell_plugin_formats}/bin/nu_plugin_formats
register ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats
use kink.nu
'';

View file

@ -1,34 +0,0 @@
{ stdenv
, lib
, rustPlatform
, nushell
, IOKit
, CoreFoundation
}:
let
pname = "nushell_plugin_formats";
in
rustPlatform.buildRustPackage {
inherit pname;
version = nushell.version;
src = nushell.src;
cargoHash = "sha256-pwOdSJHd9njR0lr4n2EzCcqRonh0cbBHGZgAJ1l8FEk=";
buildInputs = lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
cargoBuildFlags = [ "--package nu_plugin_formats" ];
# compilation fails with a missing symbol
doCheck = false;
meta = with lib; {
description = "A Nushell plugin to convert various data formats";
homepage = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_formats";
license = licenses.mpl20;
maintainers = [{ email = "erwin@datarift.nl"; github = "eboskma"; name = "Erwin Boskma"; githubId = 346752; }];
platforms = with platforms; all;
};
}