2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
nushell,
|
|
|
|
IOKit,
|
|
|
|
CoreFoundation,
|
|
|
|
nix-update-script,
|
|
|
|
pkg-config,
|
|
|
|
openssl,
|
|
|
|
curl,
|
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;
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-ygzHnrQ3zO1+lxzRUFO1+0XocGBemJKoDa4oiCjCe+0=";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
openssl
|
|
|
|
curl
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
IOKit
|
|
|
|
CoreFoundation
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Nushell plugin to query JSON, XML, and various web data";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nu_plugin_query";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_query";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = licenses.mit;
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
happysalada
|
|
|
|
aidalgol
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
platforms = with platforms; all;
|
|
|
|
};
|
|
|
|
}
|