From 3e39348bc6e314fa23e320e0a89eefe9c5d69548 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 20 Nov 2023 12:53:10 -0500 Subject: [PATCH] rust-code-analysis: fix build on darwin --- pkgs/development/tools/rust-code-analysis/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust-code-analysis/default.nix b/pkgs/development/tools/rust-code-analysis/default.nix index 7427a8bd76d6..eaf87a1908f9 100644 --- a/pkgs/development/tools/rust-code-analysis/default.nix +++ b/pkgs/development/tools/rust-code-analysis/default.nix @@ -1,4 +1,4 @@ -{ lib, rustPlatform, fetchCrate }: +{ lib, rustPlatform, fetchCrate, stdenv }: rustPlatform.buildRustPackage rec { pname = "rust-code-analysis"; @@ -12,6 +12,11 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-axrtFZQOm1/UUBq1CDFkaZCks1mWoLWmfajDfsqSBmY="; + # Work around https://github.com/NixOS/nixpkgs/issues/166205. + env = lib.optionalAttrs stdenv.cc.isClang { + NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; + }; + meta = with lib; { description = "Analyze and collect metrics on source code"; homepage = "https://github.com/mozilla/rust-code-analysis";