nixpkgs/pkgs/shells/nushell/plugins/query.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Nix
Raw Permalink Normal View History

{
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";
inherit (nushell) version src;
2024-11-13 04:33:04 -07:00
cargoHash = "sha256-xztQzfe/ZjG3YvQMDN3ADtWIcjUr3thPxbPjOKKvB9Q=";
2023-04-05 09:37:28 -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
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";
mainProgram = "nu_plugin_query";
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; [
happysalada
aidalgol
];
2024-10-08 08:17:17 -06:00
platforms = lib.platforms.all;
2023-04-05 09:37:28 -06:00
};
}