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,4 @@
import ./common.nix {
version = "115.28.0";
hash = "sha512-lnfF4YA/aGV9GKTlsmXsjqiL/J778qbEKQuTW/PG7jsMMcp4ACacAmxRISKvw2MPmCFd7JYzNvJhpXNDK6umnw==";
}

View File

@@ -0,0 +1,4 @@
import ./common.nix {
version = "128.14.0";
hash = "sha512-o88mfoK29auLZJemKxL4Wvt4/K72sSxD73lWTOgnDTMnqHM2jOSPwBjkb+9eBzOcB7mklKX/bCKoQJn5Ofap3g==";
}

View File

@@ -0,0 +1,13 @@
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
index 37c00230c853..dd89bea24392 100644
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -233,7 +233,7 @@ with only_when(host_is_osx | target_is_osx):
)
def mac_sdk_min_version():
- return "15.5"
+ return "15.2"
@depends(
"--with-macos-sdk",

View File

@@ -0,0 +1,4 @@
import ./common.nix {
version = "140.3.1";
hash = "sha512-qTAtmdfwf0slCqIUY1gUlk3QgyBCaOBf6Hej2DMLnAyqbCntGdpxvYiXm3zzntUvF2mJaLDaWw10MLZ2S0O2zA==";
}

View File

@@ -0,0 +1,37 @@
From a26bb162d9403138d64b84e8fa4f0471084c45b2 Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <kirill@korins.ky>
Date: Fri, 8 Jul 2022 21:21:25 +0200
Subject: [PATCH] Allow system's nspr and icu on bootstrapped sysroot
This patch partially reverts https://github.com/mozilla/gecko-dev/commit/9aa3587bbf0416dd2eb5b614f7b301c71c64286b
---
build/moz.configure/nspr.configure | 2 +-
js/moz.configure | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/moz.configure/nspr.configure b/build/moz.configure/nspr.configure
index bc6d62982b87a..8346f08b86923 100644
--- a/build/moz.configure/nspr.configure
+++ b/build/moz.configure/nspr.configure
@@ -19,7 +19,7 @@ def enable_nspr_build(enable):
return enable
-system_lib_option(
+option(
"--with-system-nspr",
help="Use system NSPR",
when=use_pkg_config,
diff --git a/js/moz.configure b/js/moz.configure
index 8fb51095876fa..7629b29d33c8f 100644
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -1296,7 +1296,7 @@ set_define(
# ECMAScript Internationalization API Support (uses ICU)
# ======================================================
-system_lib_option(
+option(
"--with-system-icu",
help="Use system ICU",
when=use_pkg_config,

View File

@@ -0,0 +1,40 @@
From a26bb162d9403138d64b84e8fa4f0471084c45b2 Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <kirill@korins.ky>
Date: Fri, 8 Jul 2022 21:21:25 +0200
Subject: [PATCH] Allow system's nspr and icu on bootstrapped sysroot
This patch partially reverts https://github.com/mozilla/gecko-dev/commit/9aa3587bbf0416dd2eb5b614f7b301c71c64286b
---
build/moz.configure/nspr.configure | 2 +-
js/moz.configure | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/moz.configure/nspr.configure b/build/moz.configure/nspr.configure
index 06f03d9bc72d..9687c84a7290 100644
--- a/build/moz.configure/nspr.configure
+++ b/build/moz.configure/nspr.configure
@@ -19,7 +19,7 @@ def enable_nspr_build(enable):
return enable
-system_lib_option("--with-system-nspr", help="Use system NSPR")
+option("--with-system-nspr", help="Use system NSPR")
@depends(enable_nspr_build, "--with-system-nspr", js_standalone)
diff --git a/js/moz.configure b/js/moz.configure
index b7ba9790425d..5ff5cb2da266 100644
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -1129,7 +1129,7 @@ set_define(
# ECMAScript Internationalization API Support (uses ICU)
# ======================================================
-system_lib_option("--with-system-icu", help="Use system ICU")
+option("--with-system-icu", help="Use system ICU")
system_icu = pkg_check_modules("MOZ_ICU", "icu-i18n >= 71.1", when="--with-system-icu")
--
2.37.0

View File

@@ -0,0 +1,22 @@
From 9d3f6e9ff5e66af90a5d187d902f7893fb91c24b Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <kirill@korins.ky>
Date: Fri, 1 Jul 2022 12:23:37 +0200
Subject: [PATCH] Always check for pkg-config
---
build/moz.configure/pkg.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletions(-)
diff --git a/build/moz.configure/pkg.configure b/build/moz.configure/pkg.configure
index 418331b874f47..09cc40eda03fa 100644
--- a/build/moz.configure/pkg.configure
+++ b/build/moz.configure/pkg.configure
@@ -12,7 +12,7 @@ def pkg_config(prefixes):
@depends(compile_environment, target)
def use_pkg_config(compile_environment, target):
- return compile_environment and target.os not in ("WINNT", "OSX", "Android")
+ return compile_environment
pkg_config = check_prog(

View File

@@ -0,0 +1,23 @@
From 9d3f6e9ff5e66af90a5d187d902f7893fb91c24b Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <kirill@korins.ky>
Date: Fri, 1 Jul 2022 12:23:37 +0200
Subject: [PATCH] Always check for pkg-config
---
build/moz.configure/pkg.configure | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/build/moz.configure/pkg.configure b/build/moz.configure/pkg.configure
index 6b460ae174eed..0056ecd7ae2d8 100644
--- a/build/moz.configure/pkg.configure
+++ b/build/moz.configure/pkg.configure
@@ -15,8 +15,7 @@ pkg_config = check_prog(
pkg_config,
bootstrap=depends(when=target_sysroot.bootstrapped)(lambda: "pkgconf"),
allow_missing=True,
- when=compile_environment
- & depends(target.os)(lambda os: os not in ("WINNT", "OSX", "Android")),
+ when=compile_environment,
)

View File

@@ -0,0 +1,194 @@
{ version, hash }:
{
callPackage,
lib,
stdenv,
fetchurl,
fetchpatch,
# build time
apple-sdk_14,
apple-sdk_15,
buildPackages,
cargo,
m4,
perl,
pkg-config,
python3,
rust-cbindgen,
rustPlatform,
rustc,
which,
zip,
xcbuild,
# runtime
icu75,
icu77,
nspr,
readline,
zlib,
libiconv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "spidermonkey";
inherit version;
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}esr/source/firefox-${version}esr.source.tar.xz";
inherit hash;
};
patches =
lib.optionals (lib.versionOlder version "128") [
# use pkg-config at all systems
./always-check-for-pkg-config.patch
./allow-system-s-nspr-and-icu-on-bootstrapped-sysroot.patch
]
++ lib.optionals (lib.versionAtLeast version "128") [
# rebased version of the above 2 patches
./always-check-for-pkg-config-128.patch
./allow-system-s-nspr-and-icu-on-bootstrapped-sysroot-128.patch
]
++ lib.optionals (stdenv.hostPlatform.system == "i686-linux") [
# Fixes i686 build, https://bugzilla.mozilla.org/show_bug.cgi?id=1729459
./fix-float-i686.patch
]
++ lib.optionals (lib.versionAtLeast version "140") [
# mozjs-140.pc does not contain -DXP_UNIX on Linux
# https://bugzilla.mozilla.org/show_bug.cgi?id=1973994
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/mozjs140/raw/49492baa47bc1d7b7d5bc738c4c81b4661302f27/f/9aa8b4b051dd539e0fbd5e08040870b3c712a846.patch";
hash = "sha256-SsyO5g7wlrxE7y2+VTHfmUDamofeZVqge8fv2y0ZhuU=";
})
# SDK 15.5 is not available in nixpkgs yet
./140-relax-apple-sdk.patch
];
nativeBuildInputs = [
cargo
m4
perl
pkg-config
python3
rustc
rustc.llvmPackages.llvm # for llvm-objdump
which
zip
]
++ lib.optionals (lib.versionAtLeast version "128") [
rust-cbindgen
rustPlatform.bindgenHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
xcbuild
];
buildInputs = [
(if (lib.versionAtLeast version "140") then icu77 else icu75)
nspr
readline
zlib
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
(if (lib.versionAtLeast version "140") then apple-sdk_15 else apple-sdk_14)
];
depsBuildBuild = [
buildPackages.stdenv.cc
];
setOutputFlags = false; # Configure script only understands --includedir
configureFlags = [
"--with-intl-api"
"--with-system-icu"
"--with-system-nspr"
"--with-system-zlib"
# Fedora and Arch disable optimize, but it doesn't seme to be necessary
# It turns on -O3 which some gcc version had a problem with:
# https://src.fedoraproject.org/rpms/mozjs38/c/761399aba092bcb1299bb4fccfd60f370ab4216e
"--enable-optimize"
"--enable-readline"
"--enable-release"
"--enable-shared-js"
"--disable-debug"
]
++ lib.optionals (lib.versionAtLeast version "140") [
# For pkgconfig file.
# https://bugzilla.mozilla.org/show_bug.cgi?id=1907030
# https://bugzilla.mozilla.org/show_bug.cgi?id=1957023
"--includedir=${placeholder "dev"}/include"
]
++ [
"--disable-jemalloc"
"--disable-strip"
"--disable-tests"
# Spidermonkey seems to use different host/build terminology for cross
# compilation here.
"--host=${stdenv.buildPlatform.config}"
"--target=${stdenv.hostPlatform.config}"
];
# mkDerivation by default appends --build/--host to configureFlags when cross compiling
# These defaults are bogus for Spidermonkey - avoid passing them by providing an empty list
configurePlatforms = [ ];
enableParallelBuilding = true;
preConfigure =
lib.optionalString (lib.versionAtLeast version "128") ''
export MOZBUILD_STATE_PATH=$TMPDIR/mozbuild
''
+ ''
export LIBXUL_DIST=$out
export PYTHON="${buildPackages.python3.interpreter}"
export M4=m4
export AWK=awk
export AS=$CC
export AC_MACRODIR=$PWD/build/autoconf/
patchShebangs build/cargo-linker
# We can't build in js/src/, so create a build dir
mkdir obj
cd obj/
configureScript=../js/src/configure
'';
env = lib.optionalAttrs (lib.versionAtLeast version "140") {
# '-Wformat-security' ignored without '-Wformat'
NIX_CFLAGS_COMPILE = "-Wformat";
};
# Remove unnecessary static lib
preFixup = ''
moveToOutput bin/js${lib.versions.major version}-config "$dev"
rm $out/lib/libjs_static.ajs
ln -s $out/bin/js${lib.versions.major version} $out/bin/js
'';
passthru.tests.run = callPackage ./test.nix {
spidermonkey = finalAttrs.finalPackage;
};
meta = with lib; {
description = "Mozilla's JavaScript engine written in C/C++";
homepage = "https://spidermonkey.dev/";
license = licenses.mpl20;
maintainers = with maintainers; [
lostnet
catap
bobby285271
];
# ERROR: Failed to find an adequate linker
broken = lib.versionOlder version "128" && stdenv.hostPlatform.isDarwin;
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,16 @@
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
index 51d79f9c2ec59..fafd7d6fc1e0d 100644
--- a/modules/fdlibm/src/math_private.h
+++ b/modules/fdlibm/src/math_private.h
@@ -30,5 +30,9 @@
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
*/
+#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
+typedef long double __double_t;
+#else
typedef double __double_t;
+#endif
typedef __double_t double_t;
/*

View File

@@ -0,0 +1,12 @@
{ runCommand, spidermonkey }:
runCommand "spidermonkey-test-run"
{
nativeBuildInputs = [
spidermonkey
];
}
''
diff -U3 --color=auto <(js <(echo "console.log('Hello, world\!')")) <(echo 'Hello, world!')
touch $out
''