Archived
1
0
Fork 0

gnu: icecat: Enable geckodriver.

* gnu/packages/gnuzilla.scm (icecat)[configure-flags]: Add the
--enable-geckodriver flag.
[phases]{install}: Also install the 'geckodriver' command.
[description]: Mention the existence of 'geckodriver'.
This commit is contained in:
Maxim Cournoyer 2021-11-04 13:45:36 -04:00
parent d335c89877
commit d9cef9390c
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -17,6 +17,7 @@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org> ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -985,7 +986,7 @@ in C/C++.")
#:configure-flags `("--enable-application=browser" #:configure-flags `("--enable-application=browser"
"--with-distribution-id=org.gnu" "--with-distribution-id=org.gnu"
"--enable-geckodriver"
;; Do not require addons in the global app or ;; Do not require addons in the global app or
;; system directories to be signed by Mozilla. ;; system directories to be signed by Mozilla.
"--with-unsigned-addon-scopes=app,system" "--with-unsigned-addon-scopes=app,system"
@ -1077,8 +1078,7 @@ in C/C++.")
(format #t "applying '~a'...~%" file) (format #t "applying '~a'...~%" file)
(invoke patch "--force" "--no-backup-if-mismatch" (invoke patch "--force" "--no-backup-if-mismatch"
"-p1" "--input" file)))) "-p1" "--input" file))))
(or native-inputs inputs))) (or native-inputs inputs)))))
#t))
(add-after 'apply-guix-specific-patches 'remove-bundled-libraries (add-after 'apply-guix-specific-patches 'remove-bundled-libraries
(lambda _ (lambda _
;; Remove bundled libraries that we don't use, since they may ;; Remove bundled libraries that we don't use, since they may
@ -1127,8 +1127,7 @@ in C/C++.")
;; UNBUNDLE-ME! "gfx/graphite2" ;; UNBUNDLE-ME! "gfx/graphite2"
"js/src/ctypes/libffi" "js/src/ctypes/libffi"
;; UNBUNDLE-ME! "db/sqlite3" ;; UNBUNDLE-ME! "db/sqlite3"
)) ))))
#t))
(add-after 'remove-bundled-libraries 'fix-ffmpeg-runtime-linker (add-after 'remove-bundled-libraries 'fix-ffmpeg-runtime-linker
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((ffmpeg (assoc-ref inputs "ffmpeg")) (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
@ -1136,8 +1135,7 @@ in C/C++.")
;; Arrange to load libavcodec.so by its absolute file name. ;; Arrange to load libavcodec.so by its absolute file name.
(substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp" (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
(("libavcodec\\.so") (("libavcodec\\.so")
libavcodec)) libavcodec)))))
#t)))
(add-after 'fix-ffmpeg-runtime-linker 'build-sandbox-whitelist (add-after 'fix-ffmpeg-runtime-linker 'build-sandbox-whitelist
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(define (runpath-of lib) (define (runpath-of lib)
@ -1167,8 +1165,7 @@ in C/C++.")
whitelist-string) whitelist-string)
(format port "~%pref(\"security.sandbox.content.read_path_whitelist\", ~S);~%" (format port "~%pref(\"security.sandbox.content.read_path_whitelist\", ~S);~%"
whitelist-string) whitelist-string)
(close-output-port port)) (close-output-port port))))
#t))
(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))
@ -1197,8 +1194,7 @@ in C/C++.")
"intl" "intl"
"servo" "servo"
"security/manager/ssl" "security/manager/ssl"
"build"))) "build")))))
#t))
(delete 'bootstrap) (delete 'bootstrap)
(replace 'configure (replace 'configure
;; configure does not work followed by both "SHELL=..." and ;; configure does not work followed by both "SHELL=..." and
@ -1258,10 +1254,15 @@ in C/C++.")
(("[0-9a-df-np-sv-z]{32}" hash) (("[0-9a-df-np-sv-z]{32}" hash)
(string-append (string-take hash 8) (string-append (string-take hash 8)
"<!-- Guix: not a runtime dependency -->" "<!-- Guix: not a runtime dependency -->"
(string-drop hash 8))))) (string-drop hash 8)))))))
#t))
(replace 'install (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 (add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
@ -1286,8 +1287,7 @@ in C/C++.")
;; package on guix has been observed to be unstable when ;; package on guix has been observed to be unstable when
;; using wayland, and the bundled extensions stop working. ;; using wayland, and the bundled extensions stop working.
;; `("MOZ_ENABLE_WAYLAND" = ("1")) ;; `("MOZ_ENABLE_WAYLAND" = ("1"))
`("LD_LIBRARY_PATH" prefix ,ld-libs)) `("LD_LIBRARY_PATH" prefix ,ld-libs)))))
#t)))
(add-after 'wrap-program 'install-desktop-entry (add-after 'wrap-program 'install-desktop-entry
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Install the '.desktop' file. ;; Install the '.desktop' file.
@ -1300,8 +1300,7 @@ in C/C++.")
(("Icon=.*") "Icon=icecat\n") (("Icon=.*") "Icon=icecat\n")
(("NewWindow") "new-window") (("NewWindow") "new-window")
(("NewPrivateWindow") "new-private-window")) (("NewPrivateWindow") "new-private-window"))
(install-file desktop-file applications) (install-file desktop-file applications))))
#t)))
(add-after 'install-desktop-entry 'install-icons (add-after 'install-desktop-entry 'install-icons
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
@ -1315,14 +1314,15 @@ in C/C++.")
(copy-file file (string-append icons "/icecat.png")))) (copy-file file (string-append icons "/icecat.png"))))
'("default16.png" "default22.png" "default24.png" '("default16.png" "default22.png" "default24.png"
"default32.png" "default48.png" "content/icon64.png" "default32.png" "default48.png" "content/icon64.png"
"mozicon128.png" "default256.png")) "mozicon128.png" "default256.png")))))))))
#t)))))))
(home-page "https://www.gnu.org/software/gnuzilla/") (home-page "https://www.gnu.org/software/gnuzilla/")
(synopsis "Entirely free browser derived from Mozilla Firefox") (synopsis "Entirely free browser derived from Mozilla Firefox")
(description (description
"IceCat is the GNU version of the Firefox browser. It is entirely free "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 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. 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 This is a preview release, and does not currently meet the privacy-respecting