ast-grep: fix build with clang 12+

Work around NixOS#166205
This commit is contained in:
eth3lbert 2023-11-21 15:10:20 +08:00
parent 9493008d4b
commit 8bba01f034
No known key found for this signature in database

View File

@ -17,6 +17,11 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-OFNqBkPAKaSqDQUWisupj6FlDbm3kw0xq5nbvj04H5U=";
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml