summaryrefslogtreecommitdiff
path: root/gnu/packages/gnuzilla.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/gnuzilla.scm')
-rw-r--r--gnu/packages/gnuzilla.scm137
1 files changed, 74 insertions, 63 deletions
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index df344a1749..579103bd5e 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -16,6 +16,8 @@
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr>
;;;
;;; This file is part of GNU Guix.
@@ -342,8 +344,7 @@ in C/C++.")
(let ((out (assoc-ref outputs "out")))
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
- (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
- "/bin/autoconf"))
+ (setenv "AUTOCONF" (which "autoconf"))
(apply invoke "./configure"
(cons (string-append "--prefix=" out)
configure-flags))))))))
@@ -359,7 +360,7 @@ in C/C++.")
;; we take the Debian version instead, because it is easier to work with.
(package
(inherit mozjs-38)
- (version "60.2.3-2")
+ (version "60.2.3-4")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -368,27 +369,49 @@ in C/C++.")
(file-name (git-file-name "mozjs" version))
(sha256
(base32
- "091w050rwzrdcbgyi934k2viyccmlqxrp13sm2mql71mabb5dai6"))))
+ "1xl6avsj9gkgma71p56jzs7nasc767k3n1frnmri5pad4rj94bij"))))
(arguments
`(#:tests? #f ; FIXME: all tests pass, but then the check phase fails anyway.
#:test-target "check-jstests"
#:configure-flags
- '("--enable-ctypes"
- "--enable-optimize"
- "--enable-pie"
- "--enable-readline"
- "--enable-shared-js"
- "--enable-system-ffi"
- "--with-system-nspr"
- "--with-system-zlib"
- "--with-system-icu"
- "--with-intl-api"
- ;; This is important because without it gjs will segfault during the
- ;; configure phase. With jemalloc only the standalone mozjs console
- ;; will work.
- "--disable-jemalloc")
+ ;; TODO(core-updates): unconditionally use 'quasiquote
+ ,#~(#$(if (%current-target-system)
+ #~quasiquote
+ #~quote)
+ ("--enable-ctypes"
+ "--enable-optimize"
+ "--enable-pie"
+ "--enable-readline"
+ "--enable-shared-js"
+ "--enable-system-ffi"
+ "--with-system-nspr"
+ #$@(if (%current-target-system)
+ #~(,(string-append "--with-nspr-prefix="
+ #$(this-package-input "nspr")))
+ #~())
+ "--with-system-zlib"
+ "--with-system-icu"
+ "--with-intl-api"
+ ;; This is important because without it gjs will segfault during the
+ ;; configure phase. With jemalloc only the standalone mozjs console
+ ;; will work.
+ "--disable-jemalloc"
+ ;; Mozilla deviates from Autotools conventions due to historical
+ ;; reasons.
+ #$@(if (%current-target-system)
+ #~(#$(string-append
+ "--host="
+ (nix-system->gnu-triplet (%current-system)))
+ #$(string-append "--target=" (%current-target-system)))
+ #~())))
#:phases
(modify-phases %standard-phases
+ ;; Make sure pkg-config will be found.
+ ,@(if (%current-target-system)
+ `((add-before 'configure 'set-PKG-CONFIG
+ (lambda _
+ (setenv "PKG_CONFIG" ,(pkg-config-for-target)))))
+ '())
(replace 'configure
(lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
;; The configure script does not accept environment variables as
@@ -399,8 +422,7 @@ in C/C++.")
(chdir "run-configure-from-here")
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
- (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
- "/bin/autoconf"))
+ (setenv "AUTOCONF" (which "autoconf"))
(apply invoke "../js/src/configure"
(cons (string-append "--prefix=" out)
configure-flags))
@@ -422,7 +444,7 @@ in C/C++.")
(define-public mozjs-78
(package
(inherit mozjs-60)
- (version "78.6.1")
+ (version "78.15.0")
(source (origin
(method url-fetch)
;; TODO: Switch to IceCat source once available on ftp.gnu.org.
@@ -431,7 +453,7 @@ in C/C++.")
version "esr.source.tar.xz"))
(sha256
(base32
- "1kp75838a38x4h0w98qn01g9asn7jlgm64bz7n70353bnr6bf1qd"))))
+ "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4"))))
(arguments
`(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
#:modules ((guix build cargo-utils)
@@ -458,12 +480,6 @@ in C/C++.")
"--with-intl-api")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'patch-StructuredClone.h
- (lambda _
- (substitute* "js/public/StructuredClone.h"
- (("class SharedArrayRawBufferRefs \\{")
- "class JS_PUBLIC_API SharedArrayRawBufferRefs {"))
- #t))
(add-after 'patch-source-shebangs 'patch-cargo-checksums
(lambda _
(let ((null-hash
@@ -487,8 +503,7 @@ in C/C++.")
(chdir "run-configure-from-here")
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
- (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
- "/bin/autoconf"))
+ (setenv "AUTOCONF" (which "autoconf"))
(apply invoke "../js/src/configure"
(cons (string-append "--prefix=" out)
configure-flags))
@@ -564,7 +579,7 @@ in C/C++.")
("rust" ,rust)
("cargo" ,rust "cargo")))
(inputs
- `(("icu4c" ,icu4c-68)
+ `(("icu4c" ,icu4c)
("readline" ,readline)
("zlib" ,zlib)))))
@@ -916,7 +931,7 @@ in C/C++.")
("libffi" ,libffi)
("ffmpeg" ,ffmpeg)
("libvpx" ,libvpx)
- ("icu4c" ,icu4c-69)
+ ("icu4c" ,icu4c)
("pixman" ,pixman)
("pulseaudio" ,pulseaudio)
("mesa" ,mesa)
@@ -949,8 +964,8 @@ in C/C++.")
("patch" ,(canonical-package patch))
- ("rust" ,rust-1.51)
- ("cargo" ,rust-1.51 "cargo")
+ ("rust" ,rust)
+ ("cargo" ,rust "cargo")
("rust-cbindgen" ,rust-cbindgen-0.19)
("llvm" ,llvm-11)
("clang" ,clang-11)
@@ -972,7 +987,7 @@ in C/C++.")
#:configure-flags `("--enable-application=browser"
"--with-distribution-id=org.gnu"
-
+ "--enable-geckodriver"
;; Do not require addons in the global app or
;; system directories to be signed by Mozilla.
"--with-unsigned-addon-scopes=app,system"
@@ -1064,8 +1079,7 @@ in C/C++.")
(format #t "applying '~a'...~%" file)
(invoke patch "--force" "--no-backup-if-mismatch"
"-p1" "--input" file))))
- (or native-inputs inputs)))
- #t))
+ (or native-inputs inputs)))))
(add-after 'apply-guix-specific-patches 'remove-bundled-libraries
(lambda _
;; Remove bundled libraries that we don't use, since they may
@@ -1114,8 +1128,7 @@ in C/C++.")
;; UNBUNDLE-ME! "gfx/graphite2"
"js/src/ctypes/libffi"
;; UNBUNDLE-ME! "db/sqlite3"
- ))
- #t))
+ ))))
(add-after 'remove-bundled-libraries 'fix-ffmpeg-runtime-linker
(lambda* (#:key inputs #:allow-other-keys)
(let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
@@ -1123,8 +1136,7 @@ in C/C++.")
;; Arrange to load libavcodec.so by its absolute file name.
(substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
(("libavcodec\\.so")
- libavcodec))
- #t)))
+ libavcodec)))))
(add-after 'fix-ffmpeg-runtime-linker 'build-sandbox-whitelist
(lambda* (#:key inputs #:allow-other-keys)
(define (runpath-of lib)
@@ -1154,8 +1166,7 @@ in C/C++.")
whitelist-string)
(format port "~%pref(\"security.sandbox.content.read_path_whitelist\", ~S);~%"
whitelist-string)
- (close-output-port port))
- #t))
+ (close-output-port port))))
(add-after 'patch-source-shebangs 'patch-cargo-checksums
(lambda _
(use-modules (guix build cargo-utils))
@@ -1184,8 +1195,7 @@ in C/C++.")
"intl"
"servo"
"security/manager/ssl"
- "build")))
- #t))
+ "build")))))
(delete 'bootstrap)
(replace 'configure
;; configure does not work followed by both "SHELL=..." and
@@ -1245,10 +1255,15 @@ in C/C++.")
(("[0-9a-df-np-sv-z]{32}" hash)
(string-append (string-take hash 8)
"<!-- Guix: not a runtime dependency -->"
- (string-drop hash 8)))))
- #t))
+ (string-drop hash 8)))))))
(replace 'install
- (lambda _ (invoke "./mach" "install")))
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "./mach" "install")
+ ;; The geckodriver binary is not installed by the above, for some
+ ;; reason. Use 'find-files' to avoid having to deal with the
+ ;; system/architecture-specific file name.
+ (install-file (first (find-files "." "geckodriver"))
+ (string-append (assoc-ref outputs "out") "/bin"))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1273,8 +1288,7 @@ in C/C++.")
;; package on guix has been observed to be unstable when
;; using wayland, and the bundled extensions stop working.
;; `("MOZ_ENABLE_WAYLAND" = ("1"))
- `("LD_LIBRARY_PATH" prefix ,ld-libs))
- #t)))
+ `("LD_LIBRARY_PATH" prefix ,ld-libs)))))
(add-after 'wrap-program 'install-desktop-entry
(lambda* (#:key outputs #:allow-other-keys)
;; Install the '.desktop' file.
@@ -1287,8 +1301,7 @@ in C/C++.")
(("Icon=.*") "Icon=icecat\n")
(("NewWindow") "new-window")
(("NewPrivateWindow") "new-private-window"))
- (install-file desktop-file applications)
- #t)))
+ (install-file desktop-file applications))))
(add-after 'install-desktop-entry 'install-icons
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -1302,14 +1315,15 @@ in C/C++.")
(copy-file file (string-append icons "/icecat.png"))))
'("default16.png" "default22.png" "default24.png"
"default32.png" "default48.png" "content/icon64.png"
- "mozicon128.png" "default256.png"))
- #t)))))))
+ "mozicon128.png" "default256.png")))))))))
(home-page "https://www.gnu.org/software/gnuzilla/")
(synopsis "Entirely free browser derived from Mozilla Firefox")
(description
"IceCat is the GNU version of the Firefox browser. It is entirely free
software, which does not recommend non-free plugins and addons. It also
-features built-in privacy-protecting features.
+features built-in privacy-protecting features. This package also includes the
+@command{geckodriver} command, which can be useful for automated web
+testing.
WARNING: IceCat 91 has not yet been released by the upstream IceCat project.
This is a preview release, and does not currently meet the privacy-respecting
@@ -1739,9 +1753,7 @@ standards of the IceCat project.")
(mozconfig (string-append (getcwd) "/.mozconfig")))
(setenv "SHELL" bash)
(setenv "AUTOCONF"
- (string-append (assoc-ref %build-inputs
- "autoconf")
- "/bin/autoconf"))
+ (search-input-file %build-inputs "/bin/autoconf"))
(setenv "CONFIG_SHELL" bash)
(setenv "QA_CONFIGURE_OPTIONS" ".*")
(setenv "MOZBUILD_STATE_PATH"
@@ -1751,8 +1763,7 @@ standards of the IceCat project.")
(setenv "CC" "gcc")
(setenv "MOZ_NOSPAM" "1")
(setenv "PYTHON"
- (string-append (assoc-ref inputs "python2")
- "/bin/python"))
+ (search-input-file inputs "/bin/python"))
(setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
(setenv "LDFLAGS" (string-append "-Wl,-rpath="
(assoc-ref outputs "out")
@@ -1898,7 +1909,7 @@ standards of the IceCat project.")
(base32
"0ww1rgm8hpmji9fjhinqrwf07j2jikdq8j2x87h5s3naw5898fr3")))))
("autoconf" ,autoconf-2.13)
- ("cargo" ,rust-1.41 "cargo")
+ ("cargo" ,rust "cargo")
("clang" ,clang)
("llvm" ,llvm)
("nasm" ,nasm)
@@ -1907,7 +1918,7 @@ standards of the IceCat project.")
("pkg-config" ,pkg-config)
("python" ,python)
("python2" ,python-2.7)
- ("rust" ,rust-1.41)
+ ("rust" ,rust)
("rust-cbindgen" ,rust-cbindgen-0.14)
("which" ,which)
("yasm" ,yasm)))