nixpkgs/pkgs/shells/nushell/plugins/gstat.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
Nix
Raw Normal View History

2023-05-17 09:41:32 +00:00
{ stdenv
, lib
, rustPlatform
, openssl
, nushell
, pkg-config
, Security
2023-12-15 20:56:01 +00:00
, libclang
, nix-update-script
2023-05-17 09:41:32 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_gstat";
inherit (nushell) version src;
2024-02-28 10:36:32 +00:00
cargoHash = "sha256-/viATLt2CixUCUa45YWo4fod2/iI/qvqB/BP8L8qrvY=";
env = lib.optionalAttrs stdenv.cc.isClang {
2023-12-15 20:56:01 +00:00
LIBCLANG_PATH = "${libclang.lib}/lib";
};
2023-05-17 09:41:32 +00:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
2023-05-17 09:41:32 +00:00
cargoBuildFlags = [ "--package nu_plugin_gstat" ];
2023-09-11 20:48:00 +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-05-17 09:41:32 +00:00
meta = with lib; {
description = "A git status plugin for Nushell";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_gstat";
2023-05-17 09:41:32 +00:00
license = licenses.mpl20;
maintainers = with maintainers; [ mrkkrp aidalgol ];
2023-05-17 09:41:32 +00:00
platforms = with platforms; all;
};
}