From 49f5a9e80966a55ecc72e7f2e2e78cff11271c19 Mon Sep 17 00:00:00 2001 From: Timon Schelling Date: Thu, 26 Jun 2025 11:15:51 +0000 Subject: [PATCH] nushellPlugins.plot: init at 0.103.0-unstable-2025-06-11 --- pkgs/shells/nushell/plugins/default.nix | 1 + pkgs/shells/nushell/plugins/plot.nix | 39 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/shells/nushell/plugins/plot.nix diff --git a/pkgs/shells/nushell/plugins/default.nix b/pkgs/shells/nushell/plugins/default.nix index df15b6aadd151..f467fd15c7e59 100644 --- a/pkgs/shells/nushell/plugins/default.nix +++ b/pkgs/shells/nushell/plugins/default.nix @@ -58,6 +58,7 @@ lib.makeScope newScope ( skim = callPackage ./skim.nix { }; semver = callPackage ./semver.nix { }; hcl = callPackage ./hcl.nix { }; + plot = callPackage ./plot.nix { }; } // lib.optionalAttrs config.allowAliases { regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release."; diff --git a/pkgs/shells/nushell/plugins/plot.nix b/pkgs/shells/nushell/plugins/plot.nix new file mode 100644 index 0000000000000..19fe5baf9088f --- /dev/null +++ b/pkgs/shells/nushell/plugins/plot.nix @@ -0,0 +1,39 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "nu_plugin_plot"; + version = "0.103.0-unstable-2025-06-11"; + + src = fetchFromGitHub { + owner = "Euphrasiologist"; + repo = "nu_plugin_plot"; + rev = "5a1ca2a5ceba60108a4ca6d45ec18d213abb5227"; + hash = "sha256-yxohLQnXMxztkPshVc9uZReMT1EZkwlnORTX5UAUXsA="; + }; + + cargoHash = "sha256-5QkB6SQReWUMgUL6JS0nYR+qoGLRDnDK4fpcBmgoMp4="; + + postPatch = '' + # disable failing doctest + echo -e "[lib]\ndoctest = false\n" >> Cargo.toml + + substituteInPlace Cargo.toml \ + --replace-fail 'version = "${lib.head (lib.splitString "-" finalAttrs.version)}"' 'version = "${finalAttrs.version}"' + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Nushell plugin for plotting a list as a line graph"; + mainProgram = "nu_plugin_plot"; + homepage = "https://github.com/Euphrasiologist/nu_plugin_plot"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ timon ]; + platforms = lib.platforms.linux; + }; +})