diff --git a/pkgs/shells/nushell/plugins/query.nix b/pkgs/shells/nushell/plugins/query.nix index a24718377116..b99bf1ad8d3e 100644 --- a/pkgs/shells/nushell/plugins/query.nix +++ b/pkgs/shells/nushell/plugins/query.nix @@ -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; }; -} +})