diff options
author | eth3lbert <eth3lbert+dev@gmail.com> | 2023-11-21 15:10:20 +0800 |
---|---|---|
committer | eth3lbert <eth3lbert+dev@gmail.com> | 2023-11-21 15:14:53 +0800 |
commit | 8bba01f0347f662dcf4f15d82bed86ea26c0ac4f (patch) | |
tree | d7931c50c77c681453b087bcfe6d5cae37c3a2e8 | |
parent | 9493008d4b5583b5be8ce291e7a668a996053f20 (diff) |
ast-grep: fix build with clang 12+
Work around NixOS#166205
-rw-r--r-- | pkgs/by-name/as/ast-grep/package.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/by-name/as/ast-grep/package.nix b/pkgs/by-name/as/ast-grep/package.nix index b1979b00b0819..226174fd85c4e 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 |