2024-08-21 11:14:23 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
openssl,
|
|
|
|
nushell,
|
|
|
|
pkg-config,
|
|
|
|
Security,
|
|
|
|
nix-update-script,
|
2023-05-17 09:41:32 +00:00
|
|
|
}:
|
|
|
|
|
2023-09-11 20:54:21 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-09-11 09:58:11 +00:00
|
|
|
pname = "nushell_plugin_gstat";
|
2023-09-11 20:54:21 +00:00
|
|
|
inherit (nushell) version src;
|
2024-11-13 11:33:04 +00:00
|
|
|
cargoHash = "sha256-IGOT3tlFUjnD5DBbi8zERPcL7OiP8lwKtK4GVOR53xU=";
|
2023-09-11 22:43:05 +00:00
|
|
|
|
2024-08-21 11:14:23 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
2023-09-07 13:31:03 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
2023-05-17 09:41:32 +00:00
|
|
|
cargoBuildFlags = [ "--package nu_plugin_gstat" ];
|
2023-09-11 22:43:05 +00:00
|
|
|
|
2023-09-11 20:48:00 +00:00
|
|
|
checkPhase = ''
|
|
|
|
cargo test --manifest-path crates/nu_plugin_gstat/Cargo.toml
|
|
|
|
'';
|
2023-09-11 22:43:05 +00:00
|
|
|
|
2023-10-05 19:15:16 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
# Skip the version check and only check the hash because we inherit version from nushell.
|
|
|
|
extraArgs = [ "--version=skip" ];
|
|
|
|
};
|
2023-09-11 22:43:05 +00:00
|
|
|
|
2023-05-17 09:41:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Git status plugin for Nushell";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "nu_plugin_gstat";
|
2023-09-11 20:52:59 +00:00
|
|
|
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_gstat";
|
2024-05-31 06:49:55 +00:00
|
|
|
license = licenses.mit;
|
2024-08-21 11:14:23 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
mrkkrp
|
|
|
|
aidalgol
|
|
|
|
];
|
2023-05-17 09:41:32 +00:00
|
|
|
platforms = with platforms; all;
|
|
|
|
};
|
|
|
|
}
|