mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
premake5: fix build on darwin
This commit is contained in:
parent
3892ca21ff
commit
5927193083
@ -19,7 +19,9 @@ stdenv.mkDerivation rec {
|
||||
--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
|
||||
--replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5 \
|
||||
--replace-fail '"-arch arm64"' '""' \
|
||||
--replace-fail '"-arch x86_64"' '""'
|
||||
'' + lib.optionalString stdenv.hostPlatform.isStatic ''
|
||||
substituteInPlace \
|
||||
binmodules/example/premake5.lua \
|
||||
@ -34,6 +36,10 @@ stdenv.mkDerivation rec {
|
||||
make -f Bootstrap.mak linux
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
|
||||
"-Wno-error=implicit-function-declaration"
|
||||
]);
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 bin/release/premake5 $out/bin/premake5
|
||||
'';
|
||||
@ -47,6 +53,5 @@ stdenv.mkDerivation rec {
|
||||
mainProgram = "premake5";
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.darwin ++ lib.platforms.linux;
|
||||
broken = stdenv.isDarwin && stdenv.isAarch64;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user