Skip to content

Commit

Permalink
Fix build on Darwin
Browse files Browse the repository at this point in the history
Working around NixOS/nixpkgs#166205
  • Loading branch information
zhaofengli committed Dec 19, 2023
1 parent b6f0503 commit bdafd64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crane.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ let

ATTIC_DISTRIBUTOR = "attic";

# Workaround for https://github.com/NixOS/nixpkgs/issues/166205
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};

# See comment in `attic-tests`
doCheck = false;

Expand Down Expand Up @@ -130,6 +135,11 @@ let

nativeBuildInputs = nativeBuildInputs ++ [ jq ];

# Workaround for https://github.com/NixOS/nixpkgs/issues/166205
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};

doCheck = true;

buildPhaseCargoCommand = "";
Expand Down
5 changes: 5 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ in rustPlatform.buildRustPackage rec {

ATTIC_DISTRIBUTOR = "attic";

# Workaround for https://github.com/NixOS/nixpkgs/issues/166205
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};

# Recursive Nix is not stable yet
doCheck = false;

Expand Down

0 comments on commit bdafd64

Please sign in to comment.