nushellPlugins.formats: use rustPlatform.bindgenHook

This commit is contained in:
Weijia Wang 2024-04-17 01:57:00 +02:00
parent 8ab305986d
commit 79b9b9d80a

View File

@ -5,7 +5,6 @@
, pkg-config , pkg-config
, IOKit , IOKit
, Foundation , Foundation
, libclang
, nix-update-script , nix-update-script
}: }:
@ -14,10 +13,8 @@ rustPlatform.buildRustPackage rec {
inherit (nushell) version src; inherit (nushell) version src;
cargoHash = "sha256-mInMs0kAJn3/fgRAG0E8hgvaly2G68kT5O+D83pLq78="; cargoHash = "sha256-mInMs0kAJn3/fgRAG0E8hgvaly2G68kT5O+D83pLq78=";
env = lib.optionalAttrs stdenv.cc.isClang { nativeBuildInputs = [ pkg-config ]
LIBCLANG_PATH = "${libclang.lib}/lib"; ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
};
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.isDarwin [ IOKit Foundation ]; buildInputs = lib.optionals stdenv.isDarwin [ IOKit Foundation ];
cargoBuildFlags = [ "--package nu_plugin_formats" ]; cargoBuildFlags = [ "--package nu_plugin_formats" ];