depot/third_party/nixpkgs/pkgs/shells/nushell/plugins/gstat.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

38 lines
1.1 KiB
Nix

{ stdenv
, lib
, rustPlatform
, openssl
, nushell
, pkg-config
, Security
, nix-update-script
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_gstat";
inherit (nushell) version src;
cargoHash = "sha256-ENDDkEpUp+3a0Numb7+McVP04VtSZaU4pbu4uEFT9Jc=";
nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
cargoBuildFlags = [ "--package nu_plugin_gstat" ];
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" ];
};
meta = with lib; {
description = "A git status plugin for Nushell";
mainProgram = "nu_plugin_gstat";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_gstat";
license = licenses.mit;
maintainers = with maintainers; [ mrkkrp aidalgol ];
platforms = with platforms; all;
};
}