mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-02-16 17:43:10 +01:00
gnu: Add firefox-esr. Update firefox to 103.0.2.
* nongnu/packages/mozilla.scm (firefox-esr): New variable, previously package definition of firefox. [phases]: New phase set-build-id moved from configure. In configure set MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE which replaced MACH_USE_SYSTEM_PYTHON. Set GUIX_PYTHON_PATH. [inputs]: Use icu4c-71. [native-inputs]: Use rust-cbindgen-0.23. [description]: Mention that it's now the ESR branch. (%firefox-esr-build-id): New variable. (firefox-esr/wayland): New variable. Adjusted packaged definition of firefox/wayland. (firefox): Inherit from firefox-esr. Co-authored-by: Jonathan Brielmaier <jonathan.brielmaier@web.de> Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
parent
0eedb79c59
commit
9ddaa356d2
1 changed files with 119 additions and 45 deletions
|
@ -533,19 +533,19 @@ according to Unicode Standard Annex #31")
|
||||||
|
|
||||||
;; Update this id with every firefox update to it's release date.
|
;; Update this id with every firefox update to it's release date.
|
||||||
;; It's used for cache validation and therefor can lead to strange bugs.
|
;; It's used for cache validation and therefor can lead to strange bugs.
|
||||||
(define %firefox-build-id "20220520000000")
|
(define %firefox-esr-build-id "20220726000000")
|
||||||
|
|
||||||
(define-public firefox
|
(define-public firefox-esr
|
||||||
(package
|
(package
|
||||||
(name "firefox")
|
(name "firefox-esr")
|
||||||
(version "100.0.2")
|
(version "102.1.0esr")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
||||||
version "/source/firefox-" version ".source.tar.xz"))
|
version "/source/firefox-" version ".source.tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "05w499jjsi8n04zwwr5vskriddafd6dghyhlizykhsag41hrh46w"))))
|
(base32 "0q4lawxynvdiihlqnqiwxdp0ai71qq2fp6mkdsy5p08vgmr6wyv3"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
@ -622,7 +622,6 @@ according to Unicode Standard Annex #31")
|
||||||
(substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
|
(substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
|
||||||
(("libavcodec\\.so")
|
(("libavcodec\\.so")
|
||||||
libavcodec)))))
|
libavcodec)))))
|
||||||
|
|
||||||
(add-after 'patch-source-shebangs 'patch-cargo-checksums
|
(add-after 'patch-source-shebangs 'patch-cargo-checksums
|
||||||
(lambda _
|
(lambda _
|
||||||
(use-modules (guix build cargo-utils))
|
(use-modules (guix build cargo-utils))
|
||||||
|
@ -664,13 +663,24 @@ according to Unicode Standard Annex #31")
|
||||||
(substitute* "build/RunCbindgen.py"
|
(substitute* "build/RunCbindgen.py"
|
||||||
(("\"--frozen\",") ""))))
|
(("\"--frozen\",") ""))))
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
|
(add-before 'configure 'set-build-id
|
||||||
|
;; Firefox will write the timestamp to output, which is harmful
|
||||||
|
;; for reproducibility, so change it to a fixed date. Use a
|
||||||
|
;; separate phase for easier modification with inherit.
|
||||||
|
(lambda _
|
||||||
|
(setenv "MOZ_BUILD_DATE" #$%firefox-esr-build-id)))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
|
(lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
|
||||||
(setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
|
(setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
|
||||||
"/bin/autoconf"))
|
"/bin/autoconf"))
|
||||||
(setenv "SHELL" (which "bash"))
|
(setenv "SHELL" (which "bash"))
|
||||||
(setenv "CONFIG_SHELL" (which "bash"))
|
(setenv "CONFIG_SHELL" (which "bash"))
|
||||||
(setenv "MACH_USE_SYSTEM_PYTHON" "1")
|
(setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system")
|
||||||
|
;; This should use the host info probably (does firefox build on
|
||||||
|
;; non-x86_64 though?)
|
||||||
|
(setenv "GUIX_PYTHONPATH"
|
||||||
|
(string-append (getcwd)
|
||||||
|
"/obj-x86_64-pc-linux-gnu/_virtualenvs/build"))
|
||||||
|
|
||||||
;; Use Clang, Clang is 2x faster than GCC
|
;; Use Clang, Clang is 2x faster than GCC
|
||||||
(setenv "AR" "llvm-ar")
|
(setenv "AR" "llvm-ar")
|
||||||
|
@ -687,9 +697,6 @@ according to Unicode Standard Annex #31")
|
||||||
"/bin/clang++"))
|
"/bin/clang++"))
|
||||||
|
|
||||||
(setenv "MOZ_NOSPAM" "1")
|
(setenv "MOZ_NOSPAM" "1")
|
||||||
;; Firefox will write the timestamp to output, which is harmful for
|
|
||||||
;; reproducibility, so change it to a fixed date.
|
|
||||||
(setenv "MOZ_BUILD_DATE" #$%firefox-build-id)
|
|
||||||
|
|
||||||
(setenv "MOZBUILD_STATE_PATH" (getcwd))
|
(setenv "MOZBUILD_STATE_PATH" (getcwd))
|
||||||
|
|
||||||
|
@ -817,7 +824,7 @@ according to Unicode Standard Annex #31")
|
||||||
gtk+
|
gtk+
|
||||||
gtk+-2
|
gtk+-2
|
||||||
hunspell
|
hunspell
|
||||||
icu4c-70
|
icu4c-71
|
||||||
jemalloc
|
jemalloc
|
||||||
libcanberra
|
libcanberra
|
||||||
libevent
|
libevent
|
||||||
|
@ -861,16 +868,83 @@ according to Unicode Standard Annex #31")
|
||||||
pkg-config
|
pkg-config
|
||||||
python
|
python
|
||||||
rust-firefox
|
rust-firefox
|
||||||
rust-cbindgen-0.19
|
rust-cbindgen-0.23
|
||||||
which
|
which
|
||||||
yasm))
|
yasm))
|
||||||
(home-page "https://mozilla.org/firefox/")
|
(home-page "https://mozilla.org/firefox/")
|
||||||
(synopsis "Trademarkless version of Firefox")
|
(synopsis "Trademarkless version of Firefox")
|
||||||
(description
|
(description
|
||||||
"Full-featured browser client built from Firefox source tree, without
|
"Full-featured browser client built from Firefox source tree, without
|
||||||
the official icon and the name \"firefox\".")
|
the official icon and the name \"firefox\". This is the Extended Support
|
||||||
|
Release (ESR) version.")
|
||||||
(license license:mpl2.0)))
|
(license license:mpl2.0)))
|
||||||
|
|
||||||
|
(define-public firefox-esr/wayland
|
||||||
|
(package
|
||||||
|
(inherit firefox-esr)
|
||||||
|
(name "firefox-esr-wayland")
|
||||||
|
(native-inputs '())
|
||||||
|
(inputs
|
||||||
|
`(("bash" ,bash-minimal)
|
||||||
|
("firefox-esr" ,firefox-esr)))
|
||||||
|
(build-system trivial-build-system)
|
||||||
|
(arguments
|
||||||
|
'(#:modules ((guix build utils))
|
||||||
|
#:builder
|
||||||
|
(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(let* ((bash (assoc-ref %build-inputs "bash"))
|
||||||
|
(firefox (assoc-ref %build-inputs "firefox-esr"))
|
||||||
|
(out (assoc-ref %outputs "out"))
|
||||||
|
(exe (string-append out "/bin/firefox")))
|
||||||
|
(mkdir-p (dirname exe))
|
||||||
|
|
||||||
|
(call-with-output-file exe
|
||||||
|
(lambda (port)
|
||||||
|
(format port "#!~a
|
||||||
|
MOZ_ENABLE_WAYLAND=1 exec ~a $@\n"
|
||||||
|
(string-append bash "/bin/bash")
|
||||||
|
(string-append firefox "/bin/firefox"))))
|
||||||
|
(chmod exe #o555)
|
||||||
|
|
||||||
|
;; Provide the manual and .desktop file.
|
||||||
|
(copy-recursively (string-append firefox "/share")
|
||||||
|
(string-append out "/share"))
|
||||||
|
(substitute* (string-append
|
||||||
|
out "/share/applications/firefox.desktop")
|
||||||
|
((firefox) out))
|
||||||
|
#t))))))
|
||||||
|
|
||||||
|
;; Update this id with every firefox update to it's release date.
|
||||||
|
;; It's used for cache validation and therefor can lead to strange bugs.
|
||||||
|
(define %firefox-build-id "20220809000000")
|
||||||
|
|
||||||
|
(define-public firefox
|
||||||
|
(package
|
||||||
|
(inherit firefox-esr)
|
||||||
|
(name "firefox")
|
||||||
|
(version "103.0.2")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "https://archive.mozilla.org/pub/firefox/releases/"
|
||||||
|
version "/source/firefox-" version ".source.tar.xz"))
|
||||||
|
(sha256
|
||||||
|
(base32 "1ajkshdsbbi4fdxdkjf632qaxzqrg4is6pd80m1sh5wwwgl86qbn"))))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments firefox-esr)
|
||||||
|
((#:phases phases)
|
||||||
|
#~(modify-phases #$phases
|
||||||
|
(replace 'set-build-id
|
||||||
|
(lambda _
|
||||||
|
(setenv "MOZ_BUILD_DATE" #$%firefox-build-id)))))))
|
||||||
|
(native-inputs
|
||||||
|
(modify-inputs (package-native-inputs firefox-esr)
|
||||||
|
(replace "rust-cbindgen" rust-cbindgen-0.24)))
|
||||||
|
(description
|
||||||
|
"Full-featured browser client built from Firefox source tree, without
|
||||||
|
the official icon and the name \"firefox\".")))
|
||||||
|
|
||||||
(define-public firefox/wayland
|
(define-public firefox/wayland
|
||||||
(package
|
(package
|
||||||
(inherit firefox)
|
(inherit firefox)
|
||||||
|
|
Loading…
Add table
Reference in a new issue