1{
2 stdenv,
3 lib,
4 rustPlatform,
5 nushell,
6 nix-update-script,
7 pkg-config,
8 openssl,
9 curl,
10}:
11
12rustPlatform.buildRustPackage (finalAttrs: {
13 pname = "nu_plugin_query";
14 inherit (nushell) version src cargoHash;
15
16 nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
17 buildInputs = [
18 openssl
19 curl
20 ];
21
22 buildAndTestSubdir = "crates/nu_plugin_query";
23
24 passthru.updateScript = nix-update-script {
25 # Skip the version check and only check the hash because we inherit version from nushell.
26 extraArgs = [ "--version=skip" ];
27 };
28
29 meta = {
30 description = "Nushell plugin to query JSON, XML, and various web data";
31 mainProgram = "nu_plugin_query";
32 homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_query";
33 license = lib.licenses.mit;
34 maintainers = with lib.maintainers; [
35 happysalada
36 aidalgol
37 ];
38 };
39})