port patches

This commit is contained in:
2025-05-11 09:20:43 +08:00
parent dda3dcd3fe
commit fa20c1d562
6 changed files with 20 additions and 4 deletions

View File

@@ -327,6 +327,8 @@ rec {
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
};
mingwW64Static = mingwW64 // { isStatic = true; };
ucrt64 = {
config = "x86_64-w64-mingw32";
libc = "ucrt"; # This distinguishes the mingw (non posix) toolchain

View File

@@ -611,10 +611,10 @@ in
then
# While MariaDB comes with a 'mysql' super user account since 10.4.x, MySQL does not
# Since we don't want to run this service as 'root' we need to ensure the account exists on first run
( echo "CREATE USER IF NOT EXISTS '${cfg.user}'@'localhost' IDENTIFIED WITH ${
( echo "CREATE USER IF NOT EXISTS '${cfg.user}' IDENTIFIED WITH ${
if isMariaDB then "unix_socket" else "auth_socket"
};"
echo "GRANT ALL PRIVILEGES ON *.* TO '${cfg.user}'@'localhost' WITH GRANT OPTION;"
echo "GRANT ALL PRIVILEGES ON *.* TO '${cfg.user}' WITH GRANT OPTION;"
) | ${cfg.package}/bin/mysql -u ${superUser} -N
${lib.concatMapStrings (database: ''

View File

@@ -113,6 +113,14 @@ let
proxy_set_header X-Forwarded-Server $host;
'';
recommendedProxyConfigNoHost = pkgs.writeText "nginx-recommended-proxy-headers-no-host.conf" ''
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
'';
proxyCachePathConfig = concatStringsSep "\n" (
mapAttrsToList (name: proxyCachePath: ''
proxy_cache_path ${
@@ -543,6 +551,7 @@ let
${optionalString (
config.proxyPass != null && config.recommendedProxySettings
) "include ${recommendedProxyConfig};"}
${optionalString (config.proxyPass != null && config.recommendedProxySettingsNoHost) "include ${recommendedProxyConfigNoHost};"}
${optionalString (
config.uwsgiPass != null && config.recommendedUwsgiSettings
) "include ${cfg.package}/conf/uwsgi_params;"}

View File

@@ -8,6 +8,7 @@
makeWrapper,
writeTextFile,
vscodeExtensions ? [ ],
extraFlags ? "",
}:
/*
@@ -68,7 +69,7 @@ let
extensionsFlag = ''
--add-flags "--extensions-dir ${combinedExtensionsDrv}/share/vscode/extensions"
'';
'' + extraFlags;
in
runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}"

View File

@@ -37,6 +37,7 @@
# note that opempi fails to build with AVX disabled, meaning that everything
# up to AVX is enabled by default.
avxOptions ? { },
enableSubstitute ? true,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -230,7 +231,7 @@ stdenv.mkDerivation (finalAttrs: {
# compilers at build time
${lib.pipe wrapperDataFileNames [
(lib.mapCartesianProduct (
{ part1, part2 }:
{ part1, part2 }: lib.optionalString enableSubstitute
''
substituteInPlace "''${!outputDev}/share/openmpi/${part1}${part2}-wrapper-data.txt" \
--replace-fail \

View File

@@ -91,6 +91,9 @@ let
krohnkite = self.callPackage ./third-party/krohnkite { };
kzones = self.callPackage ./third-party/kzones { };
wallpaper-engine-plugin = self.callPackage ./third-party/wallpaper-engine-plugin { };
# Convenient for users to install various tools provided by kde
kdeGear = gear;
}
);
in