depot/third_party/nixpkgs/pkgs/shells/nushell/plugins/highlight.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

40 lines
1.1 KiB
Nix

{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_highlight";
version = "1.3.1+0.98.0";
src = fetchFromGitHub {
repo = "nu-plugin-highlight";
owner = "cptpiepmatz";
rev = "v${version}";
hash = "sha256-G669d13JBLdy/1RUXtgZkiQhjgn3SqV34VlLbQoVOzc=";
};
cargoHash = "sha256-ZZyxRiAaazLIwWtl9f30yp94HiKao3ZlYJ6B/vK14jc=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ ];
cargoBuildFlags = [ "--package nu_plugin_highlight" ];
checkPhase = ''
cargo test
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "A nushell plugin that will inspect a file and return information based on it's magic number.";
mainProgram = "nu_plugin_highlight";
homepage = "https://github.com/cptpiepmatz/nu-plugin-highlight";
license = licenses.mit;
maintainers = with maintainers; [ mgttlinger ];
platforms = with platforms; all;
};
}