mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
lua.pkgs.luv.libluv: fix linking against lua on darwin
[ 50%] Building C object CMakeFiles/luv.dir/src/luv.c.o [100%] Linking C shared library libluv.dylib Undefined symbols for architecture x86_64: "_luaL_addlstring", referenced from: _thread_dump in luv.c.o ...
This commit is contained in:
parent
bb8b193bd5
commit
fc408c8690
@ -273,17 +273,22 @@ with super;
|
||||
sed -i 's,\(option(WITH_SHARED_LIBUV.*\)OFF,\1ON,' CMakeLists.txt
|
||||
rm -rf deps/libuv
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
pkgs.libuv
|
||||
];
|
||||
|
||||
buildInputs = [ pkgs.libuv ];
|
||||
|
||||
passthru = {
|
||||
libluv = self.luv.override({
|
||||
libluv = self.luv.override ({
|
||||
preBuild = self.luv.preBuild + ''
|
||||
sed -i 's,\(option(BUILD_MODULE.*\)ON,\1OFF,' CMakeLists.txt
|
||||
sed -i 's,\(option(BUILD_SHARED_LIBS.*\)OFF,\1ON,' CMakeLists.txt
|
||||
sed -i 's,${"\${INSTALL_INC_DIR}"},${placeholder "out"}/include/luv,' CMakeLists.txt
|
||||
sed -i 's,\(option(BUILD_MODULE.*\)ON,\1OFF,' CMakeLists.txt
|
||||
sed -i 's,\(option(BUILD_SHARED_LIBS.*\)OFF,\1ON,' CMakeLists.txt
|
||||
sed -i 's,${"\${INSTALL_INC_DIR}"},${placeholder "out"}/include/luv,' CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgs.fixDarwinDylibNames ];
|
||||
|
||||
# Fixup linking libluv.dylib, for some reason it's not linked against lua correctly.
|
||||
NIX_LDFLAGS = pkgs.lib.optionalString pkgs.stdenv.isDarwin
|
||||
(if isLuaJIT then "-lluajit-${lua.luaversion}" else "-llua");
|
||||
});
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user