Skip to content

Commit

Permalink
difftastic: fix build with clang 12+
Browse files Browse the repository at this point in the history
Work around NixOS#166205.
reckenrode committed Nov 17, 2023
1 parent 605b6f5 commit 98d128a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/tools/text/difftastic/default.nix
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 98d128a

Please sign in to comment.