Merge pull request #271551 from marsam/fix-darwin-opam

opam: fix build on darwin

Fixes https://github.com/NixOS/nixpkgs/issues/274120
This commit is contained in:
Mario Rodas
2023-12-16 13:58:02 -05:00
committed by GitHub
2 changed files with 10 additions and 0 deletions
@@ -122,6 +122,11 @@ in stdenv.mkDerivation {
outputs = [ "out" "installer" ];
setOutputFlags = false;
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};
# change argv0 to "opam" as a workaround for
# https://github.com/ocaml/opam/issues/2142
postInstall = ''
@@ -112,6 +112,11 @@ print <<'EOF';
outputs = [ "out" "installer" ];
setOutputFlags = false;
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};
# change argv0 to "opam" as a workaround for
# https://github.com/ocaml/opam/issues/2142
postInstall = ''