premake5: fix static build

This commit is contained in:
Ellie Hermaszewska 2023-08-01 21:15:59 +08:00
parent 1015d9a9f8
commit 05c2df5f93
No known key found for this signature in database

View File

@ -14,12 +14,17 @@ stdenv.mkDerivation rec {
buildInputs = [ libuuid ] ++ lib.optionals stdenv.isDarwin [ Foundation readline ];
patches = [ ./no-curl-ca.patch ];
patchPhase = ''
postPatch = ''
substituteInPlace contrib/curl/premake5.lua \
--replace "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'"
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace premake5.lua \
--replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5
'' + lib.optionalString stdenv.hostPlatform.isStatic ''
substituteInPlace \
binmodules/example/premake5.lua \
binmodules/luasocket/premake5.lua \
--replace SharedLib StaticLib
'';
buildPhase =