usql: fix build with clang 12+

See #166205

(cherry picked from commit 811294e5f0)
This commit is contained in:
Anthony Roussel
2023-11-22 22:40:47 +01:00
committed by github-actions[bot]
parent 56359ec4ad
commit aa8fed1cb4

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"