diff --git a/pkgs/tools/text/difftastic/default.nix b/pkgs/tools/text/difftastic/default.nix index 1db60b38a8dee..98c3db975edcd 100644 --- a/pkgs/tools/text/difftastic/default.nix +++ b/pkgs/tools/text/difftastic/default.nix @@ -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}