2024-08-21 05:14:23 -06:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
nushell,
|
|
|
|
IOKit,
|
|
|
|
CoreFoundation,
|
|
|
|
nix-update-script,
|
|
|
|
pkg-config,
|
|
|
|
openssl,
|
|
|
|
curl,
|
2023-04-05 09:37:28 -06:00
|
|
|
}:
|
|
|
|
|
2024-10-08 08:17:17 -06:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-05-19 06:48:47 -06:00
|
|
|
pname = "nushell_plugin_query";
|
2023-09-11 14:54:21 -06:00
|
|
|
inherit (nushell) version src;
|
2024-11-13 04:33:04 -07:00
|
|
|
cargoHash = "sha256-xztQzfe/ZjG3YvQMDN3ADtWIcjUr3thPxbPjOKKvB9Q=";
|
2023-04-05 09:37:28 -06:00
|
|
|
|
2024-08-21 05:14:23 -06:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
openssl
|
|
|
|
curl
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
IOKit
|
|
|
|
CoreFoundation
|
|
|
|
];
|
2023-04-05 09:37:28 -06:00
|
|
|
cargoBuildFlags = [ "--package nu_plugin_query" ];
|
|
|
|
|
2023-09-11 14:48:00 -06:00
|
|
|
checkPhase = ''
|
|
|
|
cargo test --manifest-path crates/nu_plugin_query/Cargo.toml
|
|
|
|
'';
|
2023-04-05 09:37:28 -06:00
|
|
|
|
2023-10-05 13:15:16 -06: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-06-12 08:21:45 -06:00
|
|
|
|
2024-10-08 08:17:17 -06:00
|
|
|
meta = {
|
2023-04-05 09:37:28 -06:00
|
|
|
description = "Nushell plugin to query JSON, XML, and various web data";
|
2024-03-18 20:14:51 -06:00
|
|
|
mainProgram = "nu_plugin_query";
|
2023-09-11 14:52:59 -06:00
|
|
|
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_query";
|
2024-10-08 08:17:17 -06:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [
|
2024-08-21 05:14:23 -06:00
|
|
|
happysalada
|
|
|
|
aidalgol
|
|
|
|
];
|
2024-10-08 08:17:17 -06:00
|
|
|
platforms = lib.platforms.all;
|
2023-04-05 09:37:28 -06:00
|
|
|
};
|
|
|
|
}
|