Merge pull request #268190 from reckenrode/difftastic-clang16

difftastic: fix build with clang 12+
This commit is contained in:
Adam C. Stephens 2023-11-18 00:08:24 -05:00 committed by GitHub
commit 005617587e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}