about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/premake
diff options
context:
space:
mode:
authorEllie Hermaszewska <git@monoid.al>2023-08-01 21:15:59 +0800
committerEllie Hermaszewska <git@monoid.al>2023-08-01 21:16:51 +0800
commit05c2df5f936d17de0461b66807466bcb22e16cbe (patch)
treefb43c2bb2cefc84d074481239f374ad63f7a3b5c /pkgs/development/tools/misc/premake
parent1015d9a9f890bcc203b1a3fe2ad3aa73495bfe4a (diff)
premake5: fix static build
Diffstat (limited to 'pkgs/development/tools/misc/premake')
-rw-r--r--pkgs/development/tools/misc/premake/5.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/premake/5.nix b/pkgs/development/tools/misc/premake/5.nix
index 8fefb65e79be3..a42d4c1a7b6e8 100644
--- a/pkgs/development/tools/misc/premake/5.nix
+++ b/pkgs/development/tools/misc/premake/5.nix
@@ -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 =