summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksana <me@aleksana.moe>2024-09-21 23:32:20 +0800
committerGitHub <noreply@github.com>2024-09-21 23:32:20 +0800
commit1f66cddf4d323ba016cd24d90ada81da4aafabaf (patch)
tree1ba9b44453bd2efe35278216477dffe9023c96d8
parentnix-serve: 77ffa33d8 -> 0.0.2 (#343319) (diff)
parentsourceHighlight: fix tests with llvm (diff)
downloadnixpkgs-1f66cddf4d323ba016cd24d90ada81da4aafabaf.tar.gz
sourceHighlight: fix tests with llvm (#329993)
-rw-r--r--pkgs/tools/text/source-highlight/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/tools/text/source-highlight/default.nix b/pkgs/tools/text/source-highlight/default.nix
index 07ed74f91c73..715b9d8ce91d 100644
--- a/pkgs/tools/text/source-highlight/default.nix
+++ b/pkgs/tools/text/source-highlight/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchpatch, fetchurl, boost, updateAutotoolsGnuConfigScriptsHook }:
+{ lib, stdenv, fetchpatch, fetchurl, boost, updateAutotoolsGnuConfigScriptsHook, llvmPackages }:
stdenv.mkDerivation rec {
pname = "source-highlight";
@@ -46,7 +46,10 @@ stdenv.mkDerivation rec {
# necessary to build on FreeBSD native pending inclusion of
# https://git.savannah.gnu.org/cgit/config.git/commit/?id=e4786449e1c26716e3f9ea182caf472e4dbc96e0
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
- buildInputs = [ boost ];
+ buildInputs = [ boost ]
+ ++ lib.optional (stdenv.targetPlatform.useLLVM or false) (llvmPackages.compiler-rt.override {
+ doFakeLibgcc = true;
+ });
configureFlags = [
"--with-boost=${boost.out}"
@@ -71,4 +74,7 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = with maintainers; [ SuperSandro2000 ];
};
+} // lib.optionalAttrs (stdenv.targetPlatform.useLLVM or false) {
+ # Force linking to "libgcc" so tests pass
+ NIX_CFLAGS_COMPILE = "-lgcc";
}