nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at flake-libs 42 lines 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 rustPlatform, 5 pkg-config, 6 nix-update-script, 7 fetchFromGitHub, 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "nushell_plugin_highlight"; 12 version = "1.4.5+0.104.0"; 13 14 src = fetchFromGitHub { 15 repo = "nu-plugin-highlight"; 16 owner = "cptpiepmatz"; 17 rev = "refs/tags/v${version}"; 18 hash = "sha256-B2CkdftlxczA6KHJsNmbPH7Grzq4MG7r6CRMvVTMkzQ="; 19 fetchSubmodules = true; 20 }; 21 22 useFetchCargoVendor = true; 23 cargoHash = "sha256-3bLATtK9r4iVpxdbg5eCvzeGpIqWMl/GTDGCORuQfgY="; 24 25 nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; 26 cargoBuildFlags = [ "--package nu_plugin_highlight" ]; 27 28 checkPhase = '' 29 cargo test 30 ''; 31 32 passthru.updateScript = nix-update-script { }; 33 34 meta = with lib; { 35 description = "A nushell plugin for syntax highlighting."; 36 mainProgram = "nu_plugin_highlight"; 37 homepage = "https://github.com/cptpiepmatz/nu-plugin-highlight"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ mgttlinger ]; 40 platforms = with platforms; all; 41 }; 42}