nushellPlugins.highlight: init at 1.3.1+0.98.0 (#347244)

This commit is contained in:
Yt 2024-10-09 12:16:52 -04:00 committed by GitHub
commit a6d0b0b9cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 41 additions and 0 deletions

View File

@ -8,4 +8,5 @@ lib.makeScope newScope (self: with self; {
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
net = callPackage ./net.nix { inherit IOKit CoreFoundation; };
units = callPackage ./units.nix { };
highlight = callPackage ./highlight.nix { };
})

View File

@ -0,0 +1,40 @@
{
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;
};
}