push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchFromGitHub,
# build inputs
cacert,
libuuid,
# build inputs (darwin)
readline,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "premake5";
version = "5.0.0-beta4";
src = fetchFromGitHub {
owner = "premake";
repo = "premake-core";
rev = "v${finalAttrs.version}";
sha256 = "sha256-sNLCyIHWDW/8jIrMFCZAqtWsh4SRugqtPR4HaoW/Vzk=";
};
buildInputs = [
libuuid
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
readline
];
patches = [ ./no-curl-ca.patch ];
postPatch = ''
substituteInPlace contrib/curl/premake5.lua \
--replace-fail "ca = nil" "ca = '${cacert}/etc/ssl/certs/ca-bundle.crt'"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace premake5.lua \
--replace-fail '"-arch arm64"' '""' \
--replace-fail '"-arch x86_64"' '""'
''
+ lib.optionalString stdenv.hostPlatform.isStatic ''
substituteInPlace \
binmodules/example/premake5.lua \
binmodules/luasocket/premake5.lua \
--replace-fail SharedLib StaticLib
'';
buildPhase =
if stdenv.hostPlatform.isDarwin then
# Error compiling the builtin zlib source, but it's not used currently
''
make PREMAKE_OPTS="--zlib-src=none" \
PLATFORM="Universal" \
-f Bootstrap.mak osx
''
else
''
make PLATFORM=${stdenv.hostPlatform.linuxArch} \
-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
'';
premake_cmd = "premake5";
setupHook = ./setup-hook.sh;
meta = {
homepage = "https://premake.github.io";
description = "Simple build configuration and project generation tool using lua";
mainProgram = "premake5";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.sarahec ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
unzip,
}:
stdenv.mkDerivation rec {
pname = "premake";
version = "4.3";
src = fetchurl {
url = "mirror://sourceforge/premake/premake-${version}-src.zip";
sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn";
};
nativeBuildInputs = [ unzip ];
buildPhase = ''
make -C build/gmake.unix/
'';
installPhase = ''
install -Dm755 bin/release/premake4 $out/bin/premake4
'';
premake_cmd = "premake4";
setupHook = ./setup-hook.sh;
meta = with lib; {
description = "Simple build configuration and project generation tool using lua";
homepage = "https://premake.github.io/";
license = lib.licenses.bsd3;
maintainers = [ maintainers.bjornfor ];
mainProgram = "premake4";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,38 @@
From a26e36d55cd2447488e01b2ff4ac65e2596862cd Mon Sep 17 00:00:00 2001
From: Ellie Hermaszewska <git@monoid.al>
Date: Mon, 3 Oct 2022 16:50:33 +0800
Subject: [PATCH] Do not set CURL_CA_BUNDLE
---
contrib/curl/premake5.lua | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/contrib/curl/premake5.lua b/contrib/curl/premake5.lua
index 474f5cfa..553bbd02 100644
--- a/contrib/curl/premake5.lua
+++ b/contrib/curl/premake5.lua
@@ -36,21 +36,6 @@ project "curl-lib"
-- find the location of the ca bundle
local ca = nil
- for _, f in ipairs {
- "/etc/ssl/certs/ca-certificates.crt",
- "/etc/openssl/certs/ca-certificates.crt",
- "/etc/pki/tls/certs/ca-bundle.crt",
- "/usr/share/ssl/certs/ca-bundle.crt",
- "/usr/local/share/certs/ca-root.crt",
- "/usr/local/share/certs/ca-root-nss.crt",
- "/etc/certs/ca-certificates.crt",
- "/etc/ssl/cert.pem",
- "/boot/system/data/ssl/CARootCertificates.pem" } do
- if os.isfile(f) then
- ca = f
- break
- end
- end
if ca then
defines { 'CURL_CA_BUNDLE="' .. ca .. '"', 'CURL_CA_PATH="' .. path.getdirectory(ca) .. '"' }
end
--
2.37.2

View File

@@ -0,0 +1,20 @@
# shellcheck shell=bash
premakeConfigurePhase() {
runHook preConfigure
local flagsArray=(
${premakefile:+--file=$premakefile}
)
concatTo flagsArray premakeFlags premakeFlagsArray premakeBackend=gmake
echoCmd 'configure flags' "${flagsArray[@]}"
@premake_cmd@ "${flagsArray[@]}"
runHook postConfigure
}
if [ -z "${configurePhase-}" ]; then
configurePhase=premakeConfigurePhase
fi