depot/third_party/nixpkgs/pkgs/shells/nushell/plugins/query.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

52 lines
1.3 KiB
Nix

{
stdenv,
lib,
rustPlatform,
nushell,
IOKit,
CoreFoundation,
nix-update-script,
pkg-config,
openssl,
curl,
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_query";
inherit (nushell) version src;
useFetchCargoVendor = true;
cargoHash = "sha256-3cmNlCTawMUpr6kSyT/YZzC717FoXkF0uTeE/D8BSFM=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs =
[
openssl
curl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
CoreFoundation
];
cargoBuildFlags = [ "--package nu_plugin_query" ];
checkPhase = ''
cargo test --manifest-path crates/nu_plugin_query/Cargo.toml
'';
passthru.updateScript = nix-update-script {
# Skip the version check and only check the hash because we inherit version from nushell.
extraArgs = [ "--version=skip" ];
};
meta = {
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";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
happysalada
aidalgol
];
platforms = lib.platforms.all;
};
}