mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
nushellPlugins.query: refactor
This commit is contained in:
@@ -9,21 +9,17 @@
|
||||
curl,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "nushell_plugin_query";
|
||||
inherit (nushell) version src cargoHash;
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
||||
buildInputs = [
|
||||
openssl
|
||||
curl
|
||||
];
|
||||
cargoBuildFlags = [ "--package nu_plugin_query" ];
|
||||
|
||||
checkPhase = ''
|
||||
cargo test --manifest-path crates/nu_plugin_query/Cargo.toml
|
||||
'';
|
||||
buildAndTestSubdir = "crates/nu_plugin_query";
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
# Skip the version check and only check the hash because we inherit version from nushell.
|
||||
@@ -33,12 +29,11 @@ rustPlatform.buildRustPackage rec {
|
||||
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";
|
||||
homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_query";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
happysalada
|
||||
aidalgol
|
||||
];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user