aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/webkit.scm
diff options
table>
1 files changed, 42 insertions, 6 deletions
context:
space:
mode:2024-06-29gnu: ghc-9.2: Update to 9.2.8.Lars-Dominik Braun
* gnu/packages/haskell.scm (ghc-9.2): Update to 9.2.8. Change-Id: I4cbb48ad166f893a5b7c707505a77effce208b86
2024-06-29gnu: ghc-9.2: Make Cabal respect GHC_PACKAGE_PATHSören Tempel
**tl;dr** Applying this patch makes Cabal work in Guix environments and ensures that Cabal picks up Haskell packages installed via Guix. Guix makes heavy use of GHC_PACKAGE_PATH to make GHC pickup Haskell packages installed via the Guix package manager. The environment variable is set using native-search-paths from the GHC packages. Unfortunately, upstream Cabal does presently not respect GHC_PACKAGE_PATH. If this environment variable is set, `cabal build` and other commands will terminate. For building packages, Guix does not make much use of cabal-install hence this is not as big of an issue. However, cabal-install does therefore presently not work out-of-the-box in environments created by Guix. For example, in `guix shell` environments. This makes it essentially impossible to use Guix for setting up development environments for Haskell software. Cabal upstream is aware of this issue and a patch exists to workaround this problem. The patch is currently not merged upstream due to issues related to reconfiguration (changing GHC_PACKAGE_PATH between `cabal configure` and `cabal build`). However, I would argue that this edge case is not that relevant for Guix and therefore propose including this patch with the Cabal Guix package. As outlined above, cabal-install is not usable by default presently, and I would therefore argue that this is a major improvement over the current situation. I am willing to work with Cabal upstream to have this issue fixed upstream eventually. Note that this requires patching the GHC package instead of the cabal-install package as Guix uses the version of the Cabal package <https://hackage.haskell.org/package/Cabal> distributed with GHC. See: https://github.com/haskell/cabal/issues/3728 * gnu/packages/haskell-apps.scm (cabal-install): Include patch to support the GHC_PACKAGE_PATH environment variable. Signed-off-by: Sören Tempel <soeren@soeren-tempel.net> Signed-off-by: Lars-Dominik Braun <lars@6xq.net> Change-Id: Ib77ffa937b878690d0e2d8964b534842b99da039
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index 89cd7ebd6b..58e8314292 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -124,7 +124,7 @@ the WPE-flavored port of WebKit.")
engine that uses Wayland for graphics output.")
(license license:bsd-2)))
-(define %webkit-version "2.36.7")
+(define %webkit-version "2.36.7") ;webkit2gtk4
(define-public webkitgtk
(package
@@ -279,11 +279,47 @@ propagated by default) such as @code{gst-plugins-good} and
license:bsd-2
license:bsd-3))))
-;;; Required by gnome-online-accounts as webkitgtk propagates libsoup 3, which
-;;; causes the build to fail. Also required by e.g. emacs-next-pgtk,
-;;; emacs-xwidgets, and some other GNOME packages for webkit2gtk-4.0. See
-;;; also the upstream tracker for libsoup 3:
-;;; https://gitlab.gnome.org/GNOME/libsoup/-/issues/218
+(define-public webkitgtk-next
+ (package
+ (inherit webkitgtk)
+ (name "webkitgtk")
+ (version "2.37.91") ;webkit2gtk5
+ (source (origin
+ (inherit (package-source webkitgtk))
+ (method url-fetch)
+ (uri (string-append "https://www.webkitgtk.org/releases/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "0r2d1dbx6s8bad011dkmx7j34gcxlz9bs14pip1qn7n1rhgxb3qi"))))
+ (build-system cmake-build-system)
+ (arguments
+ (substitute-keyword-arguments (package-arguments webkitgtk)
+ ((#:configure-flags flags)
+ #~(cons* "-DENABLE_INTROSPECTION=ON"
+ "-DUSE_GTK4=ON"
+ (delete "-DENABLE_GTKDOC=ON" #$flags)))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-before 'build 'set-CC
+ (lambda _
+ ;; Some Perl scripts check for the CC environment variable, else
+ ;; use /usr/bin/gcc.
+ (setenv "CC" "gcc")))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs webkitgtk)
+ (delete "docbook-xml" "gtk-doc")
+ (append gi-docgen)))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs webkitgtk)
+ (replace "gtk+" gtk)))
+ (inputs
+ (modify-inputs (package-inputs webkitgtk)
+ (delete "gtk+-2" "libnotify")
+ (append pango-next))))) ;TODO: remove after it's the default
+
+;;; Required by e.g. emacs-next-pgtk, emacs-xwidgets, and some other GNOME
+;;; packages for webkit2gtk-4.0. See also the upstream tracker for libsoup 3:
+;;; https://gitlab.gnome.org/GNOME/libsoup/-/issues/218.
(define-public webkitgtk-with-libsoup2
(package/inherit webkitgtk
(name "webkitgtk-with-libsoup2")