luaPackages.luv: force using system libuv

This commit is contained in:
Will Dietz 2019-05-16 11:06:43 -05:00
parent 9c10ac1663
commit b01e5a4b62
No known key found for this signature in database
GPG key ID: EBB0EA4124809D02

View file

@ -47,6 +47,15 @@ with super;
buildInputs = [ pkgs.libiconv ];
});
luv = super.luv.overrideAttrs(oa: {
# Use system libuv instead of building local and statically linking
# This is a hacky way to specify -DWITH_SHARED_LIBUV=ON which
# should be possible but I'm unable to make work.
# While at it, remove bundled libuv source entirely to be sure.
# We may wish to drop bundled lua submodules too...
preBuild = ''
sed -i 's,\(option(WITH_SHARED_LIBUV.*\)OFF,\1ON,' CMakeLists.txt
rm -rf deps/libuv
'';
propagatedBuildInputs = oa.propagatedBuildInputs ++ [ pkgs.libuv ];
});