2023-04-12 12:48:02 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, rustPlatform
|
|
|
|
, nushell
|
|
|
|
, IOKit
|
|
|
|
, CoreFoundation
|
2023-07-15 17:15:38 +00:00
|
|
|
, nix-update-script
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage {
|
2023-05-24 13:37:59 +00:00
|
|
|
pname = "nushell_plugin_query";
|
2023-10-09 19:29:22 +00:00
|
|
|
inherit (nushell) version src;
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-seqr4FZHg/f/8iMwSurJRKr41pUbKKti6H2z/JfYkuU=";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
|
|
|
|
cargoBuildFlags = [ "--package nu_plugin_query" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
checkPhase = ''
|
|
|
|
cargo test --manifest-path crates/nu_plugin_query/Cargo.toml
|
|
|
|
'';
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
# Skip the version check and only check the hash because we inherit version from nushell.
|
|
|
|
extraArgs = [ "--version=skip" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Nushell plugin to query JSON, XML, and various web data";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_query";
|
2023-04-12 12:48:02 +00:00
|
|
|
license = licenses.mpl20;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ happysalada aidalgol ];
|
2023-04-12 12:48:02 +00:00
|
|
|
platforms = with platforms; all;
|
|
|
|
};
|
|
|
|
}
|