depot/third_party/nixpkgs/pkgs/shells/nushell/plugins/highlight.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

48 lines
1.2 KiB
Nix

{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
IOKit,
Foundation,
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_highlight";
version = "1.4.3+0.102.0";
src = fetchFromGitHub {
repo = "nu-plugin-highlight";
owner = "cptpiepmatz";
rev = "refs/tags/v${version}";
hash = "sha256-0gKwk5YGysKWAFZdUAWzw3wiCvzF43N9f5Bj5NnDTJ4=";
fetchSubmodules = true;
};
useFetchCargoVendor = true;
cargoHash = "sha256-Z7fTKMZacNTRrcwJNb8kiH5G8irITQMNpt+pcskDbKQ=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
Foundation
];
cargoBuildFlags = [ "--package nu_plugin_highlight" ];
checkPhase = ''
cargo test
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
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;
};
}