From 8bba01f0347f662dcf4f15d82bed86ea26c0ac4f Mon Sep 17 00:00:00 2001 From: eth3lbert Date: Tue, 21 Nov 2023 15:10:20 +0800 Subject: [PATCH] ast-grep: fix build with clang 12+ Work around NixOS#166205 --- pkgs/by-name/as/ast-grep/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/as/ast-grep/package.nix b/pkgs/by-name/as/ast-grep/package.nix index b1979b00b081..226174fd85c4 100644 --- a/pkgs/by-name/as/ast-grep/package.nix +++ b/pkgs/by-name/as/ast-grep/package.nix @@ -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