about summary refs log tree commit diff
path: root/pkgs/tools/text/difftastic
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-11-17 17:53:01 -0500
committerRandy Eckenrode <randy@largeandhighquality.com>2023-11-17 17:54:33 -0500
commit98d128a75c0c4f2919914c7713b19dab370a483c (patch)
treeb48eac61a84c3006fb7de050f7532641c01b658c /pkgs/tools/text/difftastic
parent605b6f5e24ea3cbcec3be57853d27b721a6f3ec1 (diff)
difftastic: fix build with clang 12+
Work around https://github.com/NixOS/nixpkgs/issues/166205.
Diffstat (limited to 'pkgs/tools/text/difftastic')
-rw-r--r--pkgs/tools/text/difftastic/default.nix6
1 files changed, 6 insertions, 0 deletions
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}