about summary refs log tree commit diff
path: root/pkgs/shells/nushell
diff options
context:
space:
mode:
authorJanik <80165193+Janik-Haag@users.noreply.github.com>2023-06-26 21:02:51 +0200
committerGitHub <noreply@github.com>2023-06-26 21:02:51 +0200
commit347c91433a1e92446073817b1bfb803d8f57c059 (patch)
treedbd7d2984d9e5a44fe192b57c6226e2089a68a29 /pkgs/shells/nushell
parent74056d6e587690f2eb9004618fe6b26be0548f91 (diff)
parentf56cdd0e2b840a983457ac63f798ec4bdd196a9d (diff)
Merge pull request #232393 from mrkkrp/init-nushell-plugin-gstat
Diffstat (limited to 'pkgs/shells/nushell')
-rw-r--r--pkgs/shells/nushell/plugins/default.nix1
-rw-r--r--pkgs/shells/nushell/plugins/gstat.nix28
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/shells/nushell/plugins/default.nix b/pkgs/shells/nushell/plugins/default.nix
index ad0e0f996a50a..e79373da156e1 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 0000000000000..abddd85254591
--- /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;
+  };
+}