2023-05-17 11:41:32 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, rustPlatform
|
|
|
|
, openssl
|
|
|
|
, nushell
|
|
|
|
, pkg-config
|
2023-09-07 15:31:03 +02:00
|
|
|
, Security
|
2023-12-15 21:56:01 +01:00
|
|
|
, libclang
|
2023-09-12 00:39:19 +02:00
|
|
|
, nix-update-script
|
2023-05-17 11:41:32 +02:00
|
|
|
}:
|
|
|
|
|
2023-09-11 22:54:21 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-09-11 11:58:11 +02:00
|
|
|
pname = "nushell_plugin_gstat";
|
2023-09-11 22:54:21 +02:00
|
|
|
inherit (nushell) version src;
|
2024-01-14 16:45:27 +01:00
|
|
|
cargoHash = "sha256-YUr//URKoN99Pc5tJx9eGopKqy4Yu83jPBhLu5UYgiY=";
|
2023-09-12 00:43:05 +02:00
|
|
|
|
2023-12-16 11:08:52 +01:00
|
|
|
env = lib.optionalAttrs stdenv.cc.isClang {
|
2023-12-15 21:56:01 +01:00
|
|
|
LIBCLANG_PATH = "${libclang.lib}/lib";
|
|
|
|
};
|
2023-05-17 11:41:32 +02:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2023-09-07 15:31:03 +02:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
2023-05-17 11:41:32 +02:00
|
|
|
cargoBuildFlags = [ "--package nu_plugin_gstat" ];
|
2023-09-12 00:43:05 +02:00
|
|
|
|
2023-09-11 22:48:00 +02:00
|
|
|
checkPhase = ''
|
|
|
|
cargo test --manifest-path crates/nu_plugin_gstat/Cargo.toml
|
|
|
|
'';
|
2023-09-12 00:43:05 +02:00
|
|
|
|
2023-10-05 21:15:16 +02: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-12 00:43:05 +02:00
|
|
|
|
2023-05-17 11:41:32 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A git status plugin for Nushell";
|
2023-09-11 22:52:59 +02:00
|
|
|
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_gstat";
|
2023-05-17 11:41:32 +02:00
|
|
|
license = licenses.mpl20;
|
2023-09-12 00:30:12 +02:00
|
|
|
maintainers = with maintainers; [ mrkkrp aidalgol ];
|
2023-05-17 11:41:32 +02:00
|
|
|
platforms = with platforms; all;
|
|
|
|
};
|
|
|
|
}
|