usql: fix build with clang 12+

See #166205
This commit is contained in:
Anthony Roussel 2023-11-22 22:40:47 +01:00
parent 3b68824528
commit 811294e5f0
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E

View File

@ -1,4 +1,5 @@
{ lib
, stdenv
, fetchFromGitHub
, buildGoModule
, unixODBC
@ -49,6 +50,11 @@ buildGoModule rec {
"no_adodb"
];
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};
ldflags = [
"-s"
"-w"