From f56cdd0e2b840a983457ac63f798ec4bdd196a9d Mon Sep 17 00:00:00 2001 From: Mark Karpov Date: Wed, 17 May 2023 11:41:32 +0200 Subject: [PATCH] nushellPlugins.gstat: init --- pkgs/shells/nushell/plugins/default.nix | 1 + pkgs/shells/nushell/plugins/gstat.nix | 28 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/shells/nushell/plugins/gstat.nix diff --git a/pkgs/shells/nushell/plugins/default.nix b/pkgs/shells/nushell/plugins/default.nix index ad0e0f996a50..e79373da156e 100644 --- a/pkgs/shells/nushell/plugins/default.nix +++ b/pkgs/shells/nushell/plugins/default.nix @@ -1,5 +1,6 @@ { lib, newScope, IOKit, CoreFoundation }: lib.makeScope newScope (self: with self; { + gstat = callPackage ./gstat.nix { }; query = callPackage ./query.nix { inherit IOKit CoreFoundation; }; }) diff --git a/pkgs/shells/nushell/plugins/gstat.nix b/pkgs/shells/nushell/plugins/gstat.nix new file mode 100644 index 000000000000..abddd8525459 --- /dev/null +++ b/pkgs/shells/nushell/plugins/gstat.nix @@ -0,0 +1,28 @@ +{ stdenv +, lib +, rustPlatform +, openssl +, nushell +, pkg-config +}: + +let + pname = "nushell_plugin_gstat"; +in +rustPlatform.buildRustPackage { + inherit pname; + version = nushell.version; + src = nushell.src; + cargoHash = "sha256-+RFCkM++6DgrwFjTr3JlCgh9FqDBUOQsOucbZAi+V/k="; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ]; + cargoBuildFlags = [ "--package nu_plugin_gstat" ]; + doCheck = false; # some tests fail + meta = with lib; { + description = "A git status plugin for Nushell"; + homepage = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gstat"; + license = licenses.mpl20; + maintainers = with maintainers; [ mrkkrp ]; + platforms = with platforms; all; + }; +}