2023-07-15 17:15:38 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, rustPlatform
|
|
|
|
, openssl
|
|
|
|
, nushell
|
|
|
|
, pkg-config
|
2023-10-09 19:29:22 +00:00
|
|
|
, Security
|
|
|
|
, nix-update-script
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "nushell_plugin_gstat";
|
2023-10-09 19:29:22 +00:00
|
|
|
inherit (nushell) version src;
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-o/cOHlwo2TBlO+e6DBBKf5x6bgVGozVNMGRb2nCWPT4=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoBuildFlags = [ "--package nu_plugin_gstat" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
cargo test --manifest-path crates/nu_plugin_gstat/Cargo.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
# Skip the version check and only check the hash because we inherit version from nushell.
|
|
|
|
extraArgs = [ "--version=skip" ];
|
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A git status plugin for Nushell";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_gstat";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.mpl20;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ mrkkrp aidalgol ];
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = with platforms; all;
|
|
|
|
};
|
|
|
|
}
|