diff --git a/pkgs/shells/nushell/plugins/formats.nix b/pkgs/shells/nushell/plugins/formats.nix index 5a9b2cc03e0d..82a056b96073 100644 --- a/pkgs/shells/nushell/plugins/formats.nix +++ b/pkgs/shells/nushell/plugins/formats.nix @@ -7,32 +7,27 @@ nix-update-script, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "nushell_plugin_formats"; inherit (nushell) version src cargoHash; - useFetchCargoVendor = true; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ]; - cargoBuildFlags = [ "--package nu_plugin_formats" ]; - checkPhase = '' - cargo test --manifest-path crates/nu_plugin_formats/Cargo.toml - ''; + buildAndTestSubdir = "crates/nu_plugin_formats"; passthru.updateScript = nix-update-script { # Skip the version check and only check the hash because we inherit version from nushell. extraArgs = [ "--version=skip" ]; }; - meta = with lib; { + meta = { description = "Formats plugin for Nushell"; mainProgram = "nu_plugin_formats"; - homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_formats"; - license = licenses.mit; - maintainers = with maintainers; [ + homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_formats"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ viraptor aidalgol ]; - platforms = with platforms; all; }; -} +}) diff --git a/pkgs/shells/nushell/plugins/hcl.nix b/pkgs/shells/nushell/plugins/hcl.nix index dd06dc6a786f..995185f8063a 100644 --- a/pkgs/shells/nushell/plugins/hcl.nix +++ b/pkgs/shells/nushell/plugins/hcl.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { tag = version; hash = "sha256-V1RKZ0Tqq0LTGbHS2lLMyf6M4AgAgWSzkDeFUighO4k="; }; - useFetchCargoVendor = true; + cargoHash = "sha256-UbqKfQxut+76yB9F1gT8FEapbX/kHvaShltHpWUdhgc="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];