mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
nushellPlugins.highlight: init at 1.3.1+0.98.0 (#347244)
This commit is contained in:
commit
a6d0b0b9cc
@ -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 { };
|
||||
})
|
||||
|
40
pkgs/shells/nushell/plugins/highlight.nix
Normal file
40
pkgs/shells/nushell/plugins/highlight.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user