mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
nushellPlugins.highlight: refactor
(cherry picked from commit 17144a68f2)
This commit is contained in:
@@ -7,36 +7,29 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "nushell_plugin_highlight";
|
||||
version = "1.4.5+0.104.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "nu-plugin-highlight";
|
||||
owner = "cptpiepmatz";
|
||||
rev = "refs/tags/v${version}";
|
||||
repo = "nu-plugin-highlight";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-B2CkdftlxczA6KHJsNmbPH7Grzq4MG7r6CRMvVTMkzQ=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-3bLATtK9r4iVpxdbg5eCvzeGpIqWMl/GTDGCORuQfgY=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
||||
cargoBuildFlags = [ "--package nu_plugin_highlight" ];
|
||||
|
||||
checkPhase = ''
|
||||
cargo test
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "A nushell plugin for syntax highlighting.";
|
||||
mainProgram = "nu_plugin_highlight";
|
||||
homepage = "https://github.com/cptpiepmatz/nu-plugin-highlight";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mgttlinger ];
|
||||
platforms = with platforms; all;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ mgttlinger ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user