Unverified Commit 00561758 authored by Adam C. Stephens's avatar Adam C. Stephens Committed by GitHub
Browse files

Merge pull request #268190 from reckenrode/difftastic-clang16

difftastic: fix build with clang 12+
parents cb2c96db 98d128a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
, fetchFromGitHub
, testers
, difftastic
, stdenv
}:

let
@@ -32,6 +33,11 @@ rustPlatform.buildRustPackage rec {
    };
  };

  # Work around https://github.com/NixOS/nixpkgs/issues/166205.
  env = lib.optionalAttrs stdenv.cc.isClang {
    NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
  };

  postPatch = ''
    patch -d $cargoDepsCopy/libmimalloc-sys-0.1.24/c_src/mimalloc \
      -p1 < ${mimallocPatch}