nufmt: use rustPlatform.bindgenHook

This commit is contained in:
Nick Cao 2024-11-30 08:39:09 -05:00
parent b22490d198
commit 0ff027e0ae
No known key found for this signature in database

View File

@ -4,10 +4,9 @@
fetchFromGitHub,
rustPlatform,
apple-sdk_11,
llvmPackages,
nix-update-script,
...
}:
rustPlatform.buildRustPackage {
pname = "nufmt";
version = "0-unstable-2024-11-21";
@ -19,12 +18,14 @@ rustPlatform.buildRustPackage {
hash = "sha256-ideILLOawU6BNawmr4lqt2LGkf29wvlwQe9gqgdYRiI=";
};
nativeBuildInputs = [
rustPlatform.bindgenHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
];
env.LIBCLANG_PATH = lib.optionalString stdenv.cc.isClang "${lib.getLib llvmPackages.libclang}/lib";
cargoHash = "sha256-MHZlXmHAYIiaB6Isutqjrh45jppRzTZRSE3VqzpFBBA=";
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };