From 2d25262a15880bac6de48a9c2aa5783e21509c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Mon, 21 Aug 2023 19:56:03 +0200 Subject: [PATCH] couchdb3: fix jiffy NIF on darwin --- pkgs/servers/http/couchdb/3.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/http/couchdb/3.nix b/pkgs/servers/http/couchdb/3.nix index 3ce5272c1d93..8913dae50be4 100644 --- a/pkgs/servers/http/couchdb/3.nix +++ b/pkgs/servers/http/couchdb/3.nix @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91" substituteInPlace configure --replace '/usr/include/''${SM_HEADERS}' "${spidermonkey_91.dev}/include/mozjs-91" patchShebangs bin/rebar + '' + lib.optionalString stdenv.isDarwin '' + # LTO with Clang produces LLVM bitcode, which causes linking to fail quietly. + # (There are warnings, but no hard errors, and it produces an empty dylib.) + substituteInPlace src/jiffy/rebar.config.script --replace '"-flto"' '""' ''; nativeBuildInputs = [