diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 8ad150f13060..90505091d29c 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation { ++ lib.optionals withLibsecret [ pkg-config glib libsecret ]; # required to support pthread_cancel() - NIX_LDFLAGS = lib.optionalString (!stdenv.cc.isClang) "-lgcc_s" + NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && stdenv.hostPlatform.libc == "glibc") "-lgcc_s" + lib.optionalString (stdenv.isFreeBSD) "-lthr"; configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [