rust-code-analysis: fix build on darwin

This commit is contained in:
figsoda 2023-11-20 12:53:10 -05:00
parent d4abe32acd
commit 3e39348bc6

View file

@ -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";