1{
2 stdenv,
3 lib,
4 rustPlatform,
5 openssl,
6 nushell,
7 pkg-config,
8 nix-update-script,
9}:
10
11rustPlatform.buildRustPackage (finalAttrs: {
12 pname = "nu_plugin_gstat";
13 inherit (nushell) version src cargoHash;
14
15 nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
16 buildInputs = [ openssl ];
17
18 buildAndTestSubdir = "crates/nu_plugin_gstat";
19
20 passthru.updateScript = nix-update-script {
21 # Skip the version check and only check the hash because we inherit version from nushell.
22 extraArgs = [ "--version=skip" ];
23 };
24
25 meta = {
26 description = "Git status plugin for Nushell";
27 mainProgram = "nu_plugin_gstat";
28 homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_gstat";
29 license = lib.licenses.mit;
30 maintainers = with lib.maintainers; [
31 mrkkrp
32 aidalgol
33 ];
34 };
35})