From db443f193238bec1ee80e6987f53852da6656d26 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 6 Feb 2023 14:31:47 -0700 Subject: [PATCH] crane.nix: Also apply workaround to tests as well --- crane.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crane.nix b/crane.nix index e53363b..75c1628 100644 --- a/crane.nix +++ b/crane.nix @@ -135,6 +135,12 @@ let doCheck = true; + # Temporary workaround for https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1418363441 + preBuild = '' + export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib" + export BINDGEN_EXTRA_CLANG_ARGS="$(< ${llvmPackages.clang}/nix-support/cc-cflags) $(< ${llvmPackages.clang}/nix-support/libc-cflags) $(< ${llvmPackages.clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE" + ''; + buildPhaseCargoCommand = ""; checkPhaseCargoCommand = "cargoWithProfile test --no-run --message-format=json >cargo-test.json"; doInstallCargoArtifacts = false;