Unverified Commit 98d128a7 authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

difftastic: fix build with clang 12+

parent 605b6f5e
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}