Unverified Commit 3fdf8a8f authored by Tristan Ross's avatar Tristan Ross
Browse files

sourceHighlight: fix tests with llvm

parent 17bcadc3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
{ 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";
}