summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNoé Lopez <noelopez@free.fr>2026-06-16 16:30:39 +0200
committerNoé Lopez <noelopez@free.fr>2026-08-25 01:15:29 +0200
commit3824cb078947ae0145d3e6cc57ecb967441ffc2b (patch)
tree3a2654bc4ecd6b66cce3f19ce6f84444ad12711d /gnu
parente1cd712ba3c63208fd102dcdcdade0908acc7d2d (diff)
gnu: mozjs: Move below icecat.
It is currently too high in the file to use variables such as icecat-source and %icecat-version. This diff is better viewed with --diff-algorithm=minimal. * gnu/packages/gnuzilla.scm (mozjs, mozjs-128, mozjs-115): Move variables. Change-Id: I040d251397d54b974b721c21012d3e07824db53e Signed-off-by: Noé Lopez <noelopez@free.fr>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnuzilla.scm710
1 files changed, 355 insertions, 355 deletions
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 4c9d883531b..70f2367d7e9 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -106,361 +106,6 @@
106 #:use-module (gnu packages sqlite) 106 #:use-module (gnu packages sqlite)
107 #:use-module (gnu packages time)) 107 #:use-module (gnu packages time))
108 108
109(define-public mozjs
110 (package
111 (name "mozjs")
112 (version "140.3.0")
113 (source (origin
114 (method url-fetch)
115 ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
116 (uri (string-append "https://ftp.mozilla.org/pub/firefox"
117 "/releases/" version "esr/source/firefox-"
118 version "esr.source.tar.xz"))
119 (sha256
120 (base32
121 "05i3czn3v2qnhir8apcphbqy7rmy1dn7kcwx5yyi2qvmjcyfpipg"))))
122 (build-system gnu-build-system)
123 (arguments
124 (list
125 #:imported-modules %cargo-utils-modules ;for `generate-all-checksums'
126 #:modules `((guix build cargo-utils)
127 ,@%default-gnu-modules)
128 #:test-target "check-jstests"
129 #:configure-flags
130 #~(list
131 ;; Disable debugging symbols to save space.
132 "--disable-debug"
133 "--disable-debug-symbols"
134 ;; This is important because without it gjs will segfault during the
135 ;; configure phase. With jemalloc only the standalone mozjs console
136 ;; will work.
137 "--disable-jemalloc"
138 "--enable-tests"
139 "--enable-hardening"
140 "--enable-optimize"
141 "--enable-release"
142 "--enable-readline"
143 "--enable-rust-simd"
144 "--enable-shared-js"
145 "--with-system-icu"
146 "--with-system-nspr"
147 "--with-system-zlib"
148 "--with-intl-api")
149 #:phases
150 #~(modify-phases %standard-phases
151 (add-after 'unpack 'python-3.11-compatibility
152 (lambda _
153 (substitute* '("python/mozbuild/mozpack/files.py"
154 "python/mozbuild/mozbuild/util.py"
155 "python/mozbuild/mozbuild/action/process_define_files.py"
156 "python/mozbuild/mozbuild/backend/base.py"
157 "python/mozbuild/mozbuild/preprocessor.py")
158 (("\"rU\"") "\"r\""))))
159 (add-after 'patch-source-shebangs 'patch-cargo-checksums
160 (lambda _
161 (let ((null-hash
162 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
163 (for-each (lambda (file)
164 (format #t "patching checksums in ~a~%" file)
165 (substitute* file
166 (("^checksum = \".*\"")
167 (string-append "checksum = \"" null-hash "\""))))
168 (find-files "." "Cargo\\.lock$"))
169 (for-each generate-all-checksums
170 '("js" "third_party/rust")))))
171 (replace 'configure
172 (lambda* (#:key configure-flags #:allow-other-keys)
173 ;; The configure script does not accept environment variables as
174 ;; arguments. It also must be run from a different directory,
175 ;; but not the root directory either.
176 (mkdir "run-configure-from-here")
177 (chdir "run-configure-from-here")
178 ;; Configure script writes to $HOME.
179 (setenv "HOME" (getcwd))
180 (setenv "SHELL" (which "sh"))
181 (setenv "CONFIG_SHELL" (which "sh"))
182 (setenv "AUTOCONF" (which "autoconf"))
183 (apply invoke "python" "../configure.py"
184 "--enable-project=js"
185 (string-append "--prefix=" #$output)
186 configure-flags)))
187 (add-before 'check 'adjust-tests
188 (lambda _
189 (with-directory-excursion "../js/src/tests"
190 (substitute* "shell/os.js"
191 ;; FIXME: Why does the killed process have an exit status?
192 ((".*killed process should not have exitStatus.*")
193 ""))
194
195 ;; Most of the timezone related failures are probably
196 ;; attributable to our use of a system-provided icu4c library
197 ;; instead of the bundled one.
198 (for-each
199 delete-file
200 '( ;; FIXME: An one-hour difference is produced after DST
201 ;; starting in the timezone the test suite uses.
202 "non262/Date/15.9.5.7.js"
203
204 ;; The test suite expects a lightly patched ICU. Disable tests
205 ;; that do not work with the system version. See
206 ;; "intl/icu-patches" for clues.
207
208 ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
209 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
210 ;; related patch for why this is failing.
211 "non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js"
212 ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
213 "non262/Intl/DateTimeFormat/day-period-hour-cycle.js"
214 ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
215 "non262/Intl/available-locales-supported.js"
216 ;; FIXME: got "en-US", expected "en-US-POSIX"
217 "non262/Intl/available-locales-resolved.js"
218
219;;; Since 115:
220 ;; Mismatching array lengths
221 "non262/Intl/supportedValuesOf-timeZones-canonical.js"
222 ;; TODO: tzdata 2024a expected – find a way to regenerate
223 ;; these generated tests
224 "non262/Intl/DateTimeFormat/timeZone_version.js"
225
226 ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
227 "non262/Intl/Collator/implicithan.js"
228 ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
229 "non262/Intl/Collator/big5han-gb2312han.js"
230
231 ;; Since 128:
232 ;; FIXME: got (void 0), expected "GMT"
233 "non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js"
234 ;; FIXME: got 7, expected 9: parts count mismatch
235 "non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js"
236 "non262/Intl/DateTimeFormat/formatRange-timeZoneName.js"
237
238 ;; Since 140:
239 ;; RangeError: invalid time zone: America/Coyhaique
240 "non262/Temporal/ZonedDateTime/zones-and-links.js"
241 ;; got 2042, expected 2043
242 "non262/Temporal/Intl/consistent-dates.js"
243 ;; got "Pacific/Auckland", expected "Antarctica/McMurdo"
244 "non262/Intl/DateTimeFormat/timeZone_links.js"
245 "test262/staging/sm/Temporal/ZonedDateTime/zones-and-links.js"
246 ;; Test262Error: Expected true but got false
247 "test262/staging/Intl402/Temporal/old/zoneddatetime-dst-corner-cases.js"
248 ;; Test262Error: getTimeZoneTransition(next) does not return its input
249 "test262/intl402/Temporal/ZonedDateTime/prototype/\
250getTimeZoneTransition/result-type.js"
251 ;; Expected SameValue («1912-01-01T00:16:08+00:00[Africa/Abidjan]», «null»
252 "test262/intl402/Temporal/ZonedDateTime/prototype/\
253getTimeZoneTransition/transition-at-instant-boundaries.js"
254 ;; Expected SameValue(«1762063200000000000n», «1572760800000000000n»
255 "test262/intl402/Temporal/ZonedDateTime/prototype/\
256getTimeZoneTransition/specific-tzdb-values.js"
257 ;; Expected SameValue(«"2025-03-30T03:00:00+02:00[Europe/Berlin]"»,
258 ;; «"2020-10-25T02:00:00+01:00[Europe/Berlin]"»
259 "test262/intl402/Temporal/ZonedDateTime/prototype/\
260getTimeZoneTransition/nanoseconds-subtracted-or-added-at-dst-transition.js"
261 ;; TypeError: can't access property "epochNanoseconds",
262 ;; before.getTimeZoneTransition(...) is null
263 "test262/intl402/Temporal/ZonedDateTime/prototype/\
264getTimeZoneTransition/transitions-close-together.js")))))
265 (add-before 'check 'pre-check
266 (lambda _
267 (setenv "JSTESTS_EXTRA_ARGS"
268 (string-join
269 (list
270 ;; Do not run tests marked as "random".
271 "--exclude-random"
272 ;; Exclude web platform tests.
273 "--wpt=disabled"
274 ;; Respect the daemons configured number of jobs.
275 (string-append "--worker-count="
276 (number->string (parallel-job-count)))))))))))
277 (native-inputs
278 (list autoconf
279 llvm ;for llvm-objdump
280 m4
281 perl
282 pkg-config
283 python-wrapper
284 rust
285 `(,rust "cargo")
286 rust-cbindgen))
287 (inputs
288 (list icu4c-77 readline zlib))
289 (propagated-inputs
290 (list nspr)) ; in the Requires.private field of mozjs-*.pc
291 (home-page
292 "https://spidermonkey.dev/")
293 (synopsis "Mozilla JavaScript engine")
294 (description "SpiderMonkey is Mozilla's JavaScript engine written
295in C/C++.")
296 (license license:mpl2.0))) ; and others for some files
297
298(define-public mozjs-128
299 (package
300 (inherit mozjs)
301 (version "128.3.1")
302 (source (origin
303 (method url-fetch)
304 ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
305 (uri (string-append "https://ftp.mozilla.org/pub/firefox"
306 "/releases/" version "esr/source/firefox-"
307 version "esr.source.tar.xz"))
308 (sha256
309 (base32
310 "1a3h7p7126pxzpidb1lqckvhfh1had805mai4l96mnc878phbx61"))
311 ;; 0ad requires this version of mozjs, which surfaces a bug
312 ;; related to improper garbage collection.
313 ;; See https://gitea.wildfiregames.com/0ad/0ad/issues/8757,
314 ;; https://codeberg.org/guix/guix/issues/10467.
315 (patches
316 (search-patches "mozjs-fix-garbage-collector-tracer.patch"))))
317 (arguments
318 (substitute-keyword-arguments arguments
319 ((#:configure-flags flags)
320 #~(delete "--enable-rust-simd" #$flags))
321 ((#:phases phases)
322 #~(modify-phases #$phases
323 (replace 'adjust-tests
324 (lambda _
325 (with-directory-excursion "../js/src/tests"
326 (substitute* "shell/os.js"
327 ;; FIXME: Why does the killed process have an exit status?
328 ((".*killed process should not have exitStatus.*")
329 ""))
330
331 ;; This was fixed sometime between 102.15.1 and 115.11.0.
332 ;; These tests are supposed to be skipped on all 64-bit systems.
333 #$@(if (target-riscv64?)
334 #~((substitute* '("non262/Array/regress-157652.js"
335 "non262/regress/regress-422348.js")
336 (("mips64") "mips64|riscv64")))
337 #~())
338
339 ;; FIXME: An one-hour difference is produced after DST
340 ;; starting in the timezone the test suite uses.
341 (delete-file "non262/Date/15.9.5.7.js")
342
343 ;; The test suite expects a lightly patched ICU. Disable tests
344 ;; that do not work with the system version. See
345 ;; "intl/icu-patches" for clues.
346
347 ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
348 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
349 ;; related patch for why this is failing.
350 (delete-file "non262/Intl/DateTimeFormat/\
351fractional-second-digits-append-item.js")
352 ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
353 (delete-file "non262/Intl/DateTimeFormat/day-period-hour-cycle.js")
354 ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
355 (delete-file "non262/Intl/available-locales-supported.js")
356 ;; FIXME: got "en-US", expected "en-US-POSIX"
357 (delete-file "non262/Intl/available-locales-resolved.js")
358
359 ;;; Since 115:
360 ;; Mismatching array lengths
361 (delete-file "non262/Intl/supportedValuesOf-timeZones-canonical.js")
362 ;; FIXME: got "America/Santa_Isabel", expected "America/Tijuana":
363 ;; America/Santa_Isabel -> America/Tijuana
364 (delete-file "non262/Intl/DateTimeFormat/timeZone_backward_links.js")
365 ;; TODO: tzdata 2024a expected – find a way to regenerate
366 ;; these generated tests
367 (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js")
368
369 ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
370 (delete-file "non262/Intl/Collator/implicithan.js")
371 ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
372 (delete-file "non262/Intl/Collator/big5han-gb2312han.js")
373
374 ;; Since 128:
375 ;; FIXME: got (void 0), expected "GMT"
376 (delete-file "non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js")
377 ;; FIXME: got 7, expected 9: parts count mismatch
378 (delete-file "non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js")
379 (delete-file "non262/Intl/DateTimeFormat/formatRange-timeZoneName.js"))))))))
380 (inputs
381 (list icu4c-73 readline zlib))))
382
383(define-public mozjs-115
384 (package
385 (inherit mozjs)
386 (version "115.26.0")
387 (source (origin
388 (method url-fetch)
389 (uri (string-append "https://archive.mozilla.org/pub/firefox"
390 "/releases/" version "esr/source/firefox-"
391 version "esr.source.tar.xz"))
392 (sha256
393 (base32
394 "0xvwk3vkbxnybpi3gwk48nxffg44lbv58mbk2xq6cz50ffq0k5k2"))))
395 (arguments
396 (substitute-keyword-arguments arguments
397 ((#:configure-flags flags)
398 #~(delete "--enable-rust-simd" #$flags))
399 ((#:phases phases)
400 #~(modify-phases #$phases
401 (replace 'adjust-tests
402 (lambda _
403 (with-directory-excursion "../js/src/tests"
404 ;; The test suite expects a lightly patched ICU. Disable tests
405 ;; that do not work with the system version. See
406 ;; "intl/icu-patches" for clues.
407
408 ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
409 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
410 ;; related patch for why this is failing.
411 (delete-file "non262/Intl/DateTimeFormat/\
412fractional-second-digits-append-item.js")
413 ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
414 (delete-file "non262/Intl/DateTimeFormat/day-period-hour-cycle.js")
415 ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
416 (delete-file "non262/Intl/available-locales-supported.js")
417 ;; FIXME: got "en-US", expected "en-US-POSIX"
418 (delete-file "non262/Intl/available-locales-resolved.js")
419
420 ;;; Since 115:
421 ;; Mismatching array lengths
422 (delete-file "non262/Intl/supportedValuesOf-timeZones-canonical.js")
423 ;; FIXME: got "America/Santa_Isabel", expected "America/Tijuana":
424 ;; America/Santa_Isabel -> America/Tijuana
425 (delete-file "non262/Intl/DateTimeFormat/timeZone_backward_links.js")
426 ;; TODO: tzdata 2024a expected – find a way to regenerate
427 ;; these generated tests
428 (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js")
429
430 ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
431 (delete-file "non262/Intl/Collator/implicithan.js")
432 ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
433 (delete-file "non262/Intl/Collator/big5han-gb2312han.js"))))
434
435 (replace 'pre-check
436 (lambda _
437 (with-directory-excursion "../js/src/tests"
438 (substitute* "shell/os.js"
439 ;; FIXME: Why does the killed process have an exit status?
440 ((".*killed process should not have exitStatus.*")
441 ""))
442
443 ;; XXX: Delete all tests that test time zone functionality,
444 ;; because the test suite uses /etc/localtime to figure out
445 ;; the offset from the hardware clock, which does not work
446 ;; in the build container. See <tests/non262/Date/shell.js>.
447 (delete-file-recursively "non262/Date")
448 (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js")
449
450 (setenv "JSTESTS_EXTRA_ARGS"
451 (string-join
452 (list
453 ;; Do not run tests marked as "random".
454 "--exclude-random"
455 ;; Exclude web platform tests.
456 "--wpt=disabled"
457 ;; Respect the daemons configured number of jobs.
458 (string-append "--worker-count="
459 (number->string
460 (parallel-job-count)))))))))))))
461 (inputs
462 (list icu4c-73 readline zlib))))
463
464(define computed-origin-method (@@ (guix packages) computed-origin-method)) 109(define computed-origin-method (@@ (guix packages) computed-origin-method))
465 110
466(define mozilla-compare-locales 111(define mozilla-compare-locales
@@ -2193,6 +1838,361 @@ associated with their name."))
2193 (native-inputs '()) 1838 (native-inputs '())
2194 (inputs '()))) 1839 (inputs '())))
2195 1840
1841(define-public mozjs
1842 (package
1843 (name "mozjs")
1844 (version "140.3.0")
1845 (source (origin
1846 (method url-fetch)
1847 ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
1848 (uri (string-append "https://ftp.mozilla.org/pub/firefox"
1849 "/releases/" version "esr/source/firefox-"
1850 version "esr.source.tar.xz"))
1851 (sha256
1852 (base32
1853 "05i3czn3v2qnhir8apcphbqy7rmy1dn7kcwx5yyi2qvmjcyfpipg"))))
1854 (build-system gnu-build-system)
1855 (arguments
1856 (list
1857 #:imported-modules %cargo-utils-modules ;for `generate-all-checksums'
1858 #:modules `((guix build cargo-utils)
1859 ,@%default-gnu-modules)
1860 #:test-target "check-jstests"
1861 #:configure-flags
1862 #~(list
1863 ;; Disable debugging symbols to save space.
1864 "--disable-debug"
1865 "--disable-debug-symbols"
1866 ;; This is important because without it gjs will segfault during the
1867 ;; configure phase. With jemalloc only the standalone mozjs console
1868 ;; will work.
1869 "--disable-jemalloc"
1870 "--enable-tests"
1871 "--enable-hardening"
1872 "--enable-optimize"
1873 "--enable-release"
1874 "--enable-readline"
1875 "--enable-rust-simd"
1876 "--enable-shared-js"
1877 "--with-system-icu"
1878 "--with-system-nspr"
1879 "--with-system-zlib"
1880 "--with-intl-api")
1881 #:phases
1882 #~(modify-phases %standard-phases
1883 (add-after 'unpack 'python-3.11-compatibility
1884 (lambda _
1885 (substitute* '("python/mozbuild/mozpack/files.py"
1886 "python/mozbuild/mozbuild/util.py"
1887 "python/mozbuild/mozbuild/action/process_define_files.py"
1888 "python/mozbuild/mozbuild/backend/base.py"
1889 "python/mozbuild/mozbuild/preprocessor.py")
1890 (("\"rU\"") "\"r\""))))
1891 (add-after 'patch-source-shebangs 'patch-cargo-checksums
1892 (lambda _
1893 (let ((null-hash
1894 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
1895 (for-each (lambda (file)
1896 (format #t "patching checksums in ~a~%" file)
1897 (substitute* file
1898 (("^checksum = \".*\"")
1899 (string-append "checksum = \"" null-hash "\""))))
1900 (find-files "." "Cargo\\.lock$"))
1901 (for-each generate-all-checksums
1902 '("js" "third_party/rust")))))
1903 (replace 'configure
1904 (lambda* (#:key configure-flags #:allow-other-keys)
1905 ;; The configure script does not accept environment variables as
1906 ;; arguments. It also must be run from a different directory,
1907 ;; but not the root directory either.
1908 (mkdir "run-configure-from-here")
1909 (chdir "run-configure-from-here")
1910 ;; Configure script writes to $HOME.
1911 (setenv "HOME" (getcwd))
1912 (setenv "SHELL" (which "sh"))
1913 (setenv "CONFIG_SHELL" (which "sh"))
1914 (setenv "AUTOCONF" (which "autoconf"))
1915 (apply invoke "python" "../configure.py"
1916 "--enable-project=js"
1917 (string-append "--prefix=" #$output)
1918 configure-flags)))
1919 (add-before 'check 'adjust-tests
1920 (lambda _
1921 (with-directory-excursion "../js/src/tests"
1922 (substitute* "shell/os.js"
1923 ;; FIXME: Why does the killed process have an exit status?
1924 ((".*killed process should not have exitStatus.*")
1925 ""))
1926
1927 ;; Most of the timezone related failures are probably
1928 ;; attributable to our use of a system-provided icu4c library
1929 ;; instead of the bundled one.
1930 (for-each
1931 delete-file
1932 '( ;; FIXME: An one-hour difference is produced after DST
1933 ;; starting in the timezone the test suite uses.
1934 "non262/Date/15.9.5.7.js"
1935
1936 ;; The test suite expects a lightly patched ICU. Disable tests
1937 ;; that do not work with the system version. See
1938 ;; "intl/icu-patches" for clues.
1939
1940 ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
1941 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
1942 ;; related patch for why this is failing.
1943 "non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js"
1944 ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
1945 "non262/Intl/DateTimeFormat/day-period-hour-cycle.js"
1946 ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
1947 "non262/Intl/available-locales-supported.js"
1948 ;; FIXME: got "en-US", expected "en-US-POSIX"
1949 "non262/Intl/available-locales-resolved.js"
1950
1951;;; Since 115:
1952 ;; Mismatching array lengths
1953 "non262/Intl/supportedValuesOf-timeZones-canonical.js"
1954 ;; TODO: tzdata 2024a expected – find a way to regenerate
1955 ;; these generated tests
1956 "non262/Intl/DateTimeFormat/timeZone_version.js"
1957
1958 ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
1959 "non262/Intl/Collator/implicithan.js"
1960 ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
1961 "non262/Intl/Collator/big5han-gb2312han.js"
1962
1963 ;; Since 128:
1964 ;; FIXME: got (void 0), expected "GMT"
1965 "non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js"
1966 ;; FIXME: got 7, expected 9: parts count mismatch
1967 "non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js"
1968 "non262/Intl/DateTimeFormat/formatRange-timeZoneName.js"
1969
1970 ;; Since 140:
1971 ;; RangeError: invalid time zone: America/Coyhaique
1972 "non262/Temporal/ZonedDateTime/zones-and-links.js"
1973 ;; got 2042, expected 2043
1974 "non262/Temporal/Intl/consistent-dates.js"
1975 ;; got "Pacific/Auckland", expected "Antarctica/McMurdo"
1976 "non262/Intl/DateTimeFormat/timeZone_links.js"
1977 "test262/staging/sm/Temporal/ZonedDateTime/zones-and-links.js"
1978 ;; Test262Error: Expected true but got false
1979 "test262/staging/Intl402/Temporal/old/zoneddatetime-dst-corner-cases.js"
1980 ;; Test262Error: getTimeZoneTransition(next) does not return its input
1981 "test262/intl402/Temporal/ZonedDateTime/prototype/\
1982getTimeZoneTransition/result-type.js"
1983 ;; Expected SameValue («1912-01-01T00:16:08+00:00[Africa/Abidjan]», «null»
1984 "test262/intl402/Temporal/ZonedDateTime/prototype/\
1985getTimeZoneTransition/transition-at-instant-boundaries.js"
1986 ;; Expected SameValue(«1762063200000000000n», «1572760800000000000n»
1987 "test262/intl402/Temporal/ZonedDateTime/prototype/\
1988getTimeZoneTransition/specific-tzdb-values.js"
1989 ;; Expected SameValue(«"2025-03-30T03:00:00+02:00[Europe/Berlin]"»,
1990 ;; «"2020-10-25T02:00:00+01:00[Europe/Berlin]"»
1991 "test262/intl402/Temporal/ZonedDateTime/prototype/\
1992getTimeZoneTransition/nanoseconds-subtracted-or-added-at-dst-transition.js"
1993 ;; TypeError: can't access property "epochNanoseconds",
1994 ;; before.getTimeZoneTransition(...) is null
1995 "test262/intl402/Temporal/ZonedDateTime/prototype/\
1996getTimeZoneTransition/transitions-close-together.js")))))
1997 (add-before 'check 'pre-check
1998 (lambda _
1999 (setenv "JSTESTS_EXTRA_ARGS"
2000 (string-join
2001 (list
2002 ;; Do not run tests marked as "random".
2003 "--exclude-random"
2004 ;; Exclude web platform tests.
2005 "--wpt=disabled"
2006 ;; Respect the daemons configured number of jobs.
2007 (string-append "--worker-count="
2008 (number->string (parallel-job-count)))))))))))
2009 (native-inputs
2010 (list autoconf
2011 llvm ;for llvm-objdump
2012 m4
2013 perl
2014 pkg-config
2015 python-wrapper
2016 rust
2017 `(,rust "cargo")
2018 rust-cbindgen))
2019 (inputs
2020 (list icu4c-77 readline zlib))
2021 (propagated-inputs
2022 (list nspr)) ; in the Requires.private field of mozjs-*.pc
2023 (home-page
2024 "https://spidermonkey.dev/")
2025 (synopsis "Mozilla JavaScript engine")
2026 (description "SpiderMonkey is Mozilla's JavaScript engine written
2027in C/C++.")
2028 (license license:mpl2.0))) ; and others for some files
2029
2030(define-public mozjs-128
2031 (package
2032 (inherit mozjs)
2033 (version "128.3.1")
2034 (source (origin
2035 (method url-fetch)
2036 ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
2037 (uri (string-append "https://ftp.mozilla.org/pub/firefox"
2038 "/releases/" version "esr/source/firefox-"
2039 version "esr.source.tar.xz"))
2040 (sha256
2041 (base32
2042 "1a3h7p7126pxzpidb1lqckvhfh1had805mai4l96mnc878phbx61"))
2043 ;; 0ad requires this version of mozjs, which surfaces a bug
2044 ;; related to improper garbage collection.
2045 ;; See https://gitea.wildfiregames.com/0ad/0ad/issues/8757,
2046 ;; https://codeberg.org/guix/guix/issues/10467.
2047 (patches
2048 (search-patches "mozjs-fix-garbage-collector-tracer.patch"))))
2049 (arguments
2050 (substitute-keyword-arguments arguments
2051 ((#:configure-flags flags)
2052 #~(delete "--enable-rust-simd" #$flags))
2053 ((#:phases phases)
2054 #~(modify-phases #$phases
2055 (replace 'adjust-tests
2056 (lambda _
2057 (with-directory-excursion "../js/src/tests"
2058 (substitute* "shell/os.js"
2059 ;; FIXME: Why does the killed process have an exit status?
2060 ((".*killed process should not have exitStatus.*")
2061 ""))
2062
2063 ;; This was fixed sometime between 102.15.1 and 115.11.0.
2064 ;; These tests are supposed to be skipped on all 64-bit systems.
2065 #$@(if (target-riscv64?)
2066 #~((substitute* '("non262/Array/regress-157652.js"
2067 "non262/regress/regress-422348.js")
2068 (("mips64") "mips64|riscv64")))
2069 #~())
2070
2071 ;; FIXME: An one-hour difference is produced after DST
2072 ;; starting in the timezone the test suite uses.
2073 (delete-file "non262/Date/15.9.5.7.js")
2074
2075 ;; The test suite expects a lightly patched ICU. Disable tests
2076 ;; that do not work with the system version. See
2077 ;; "intl/icu-patches" for clues.
2078
2079 ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
2080 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
2081 ;; related patch for why this is failing.
2082 (delete-file "non262/Intl/DateTimeFormat/\
2083fractional-second-digits-append-item.js")
2084 ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
2085 (delete-file "non262/Intl/DateTimeFormat/day-period-hour-cycle.js")
2086 ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
2087 (delete-file "non262/Intl/available-locales-supported.js")
2088 ;; FIXME: got "en-US", expected "en-US-POSIX"
2089 (delete-file "non262/Intl/available-locales-resolved.js")
2090
2091 ;;; Since 115:
2092 ;; Mismatching array lengths
2093 (delete-file "non262/Intl/supportedValuesOf-timeZones-canonical.js")
2094 ;; FIXME: got "America/Santa_Isabel", expected "America/Tijuana":
2095 ;; America/Santa_Isabel -> America/Tijuana
2096 (delete-file "non262/Intl/DateTimeFormat/timeZone_backward_links.js")
2097 ;; TODO: tzdata 2024a expected – find a way to regenerate
2098 ;; these generated tests
2099 (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js")
2100
2101 ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
2102 (delete-file "non262/Intl/Collator/implicithan.js")
2103 ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
2104 (delete-file "non262/Intl/Collator/big5han-gb2312han.js")
2105
2106 ;; Since 128:
2107 ;; FIXME: got (void 0), expected "GMT"
2108 (delete-file "non262/Intl/DateTimeFormat/formatRange-timeZoneName-matches-format.js")
2109 ;; FIXME: got 7, expected 9: parts count mismatch
2110 (delete-file "non262/Intl/DateTimeFormat/formatRange-timeZone-offset.js")
2111 (delete-file "non262/Intl/DateTimeFormat/formatRange-timeZoneName.js"))))))))
2112 (inputs
2113 (list icu4c-73 readline zlib))))
2114
2115(define-public mozjs-115
2116 (package
2117 (inherit mozjs)
2118 (version "115.26.0")
2119 (source (origin
2120 (method url-fetch)
2121 (uri (string-append "https://archive.mozilla.org/pub/firefox"
2122 "/releases/" version "esr/source/firefox-"
2123 version "esr.source.tar.xz"))
2124 (sha256
2125 (base32
2126 "0xvwk3vkbxnybpi3gwk48nxffg44lbv58mbk2xq6cz50ffq0k5k2"))))
2127 (arguments
2128 (substitute-keyword-arguments arguments
2129 ((#:configure-flags flags)
2130 #~(delete "--enable-rust-simd" #$flags))
2131 ((#:phases phases)
2132 #~(modify-phases #$phases
2133 (replace 'adjust-tests
2134 (lambda _
2135 (with-directory-excursion "../js/src/tests"
2136 ;; The test suite expects a lightly patched ICU. Disable tests
2137 ;; that do not work with the system version. See
2138 ;; "intl/icu-patches" for clues.
2139
2140 ;; See <https://unicode-org.atlassian.net/browse/ICU-20992> and
2141 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=1636984> and
2142 ;; related patch for why this is failing.
2143 (delete-file "non262/Intl/DateTimeFormat/\
2144fractional-second-digits-append-item.js")
2145 ;; FIXME: got "0 \u251CAM/PM: noon\u2524", expected "0 (AM/PM: noon)"
2146 (delete-file "non262/Intl/DateTimeFormat/day-period-hour-cycle.js")
2147 ;; FIXME: got "en-US-posix", expected "en-US-POSIX".
2148 (delete-file "non262/Intl/available-locales-supported.js")
2149 ;; FIXME: got "en-US", expected "en-US-POSIX"
2150 (delete-file "non262/Intl/available-locales-resolved.js")
2151
2152 ;;; Since 115:
2153 ;; Mismatching array lengths
2154 (delete-file "non262/Intl/supportedValuesOf-timeZones-canonical.js")
2155 ;; FIXME: got "America/Santa_Isabel", expected "America/Tijuana":
2156 ;; America/Santa_Isabel -> America/Tijuana
2157 (delete-file "non262/Intl/DateTimeFormat/timeZone_backward_links.js")
2158 ;; TODO: tzdata 2024a expected – find a way to regenerate
2159 ;; these generated tests
2160 (delete-file "non262/Intl/DateTimeFormat/timeZone_version.js")
2161
2162 ;; FIXME: got "\uD840\uDDF2", expected "\u5047"
2163 (delete-file "non262/Intl/Collator/implicithan.js")
2164 ;; FIXME: got "\uD840\uDDF2", expected "\u3467"
2165 (delete-file "non262/Intl/Collator/big5han-gb2312han.js"))))
2166
2167 (replace 'pre-check
2168 (lambda _
2169 (with-directory-excursion "../js/src/tests"
2170 (substitute* "shell/os.js"
2171 ;; FIXME: Why does the killed process have an exit status?
2172 ((".*killed process should not have exitStatus.*")
2173 ""))
2174
2175 ;; XXX: Delete all tests that test time zone functionality,
2176 ;; because the test suite uses /etc/localtime to figure out
2177 ;; the offset from the hardware clock, which does not work
2178 ;; in the build container. See <tests/non262/Date/shell.js>.
2179 (delete-file-recursively "non262/Date")
2180 (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js")
2181
2182 (setenv "JSTESTS_EXTRA_ARGS"
2183 (string-join
2184 (list
2185 ;; Do not run tests marked as "random".
2186 "--exclude-random"
2187 ;; Exclude web platform tests.
2188 "--wpt=disabled"
2189 ;; Respect the daemons configured number of jobs.
2190 (string-append "--worker-count="
2191 (number->string
2192 (parallel-job-count)))))))))))))
2193 (inputs
2194 (list icu4c-73 readline zlib))))
2195
2196(define-public firefox-decrypt 2196(define-public firefox-decrypt
2197 (package 2197 (package
2198 (name "firefox-decrypt") 2198 (name "firefox-decrypt")