diff options
author | Ekaitz Zarraga <[email protected]> | 2025-03-09 18:56:34 +0100 |
---|---|---|
committer | Ekaitz Zarraga <[email protected]> | 2025-03-09 23:00:03 +0100 |
commit | 4723b9f14d50490fd8f81857beea44059ce33ac4 (patch) | |
tree | 0e2c5f526e430225e39e02ca40a6edf6aa147700 /gnu | |
parent | e37d407e6c17d36c31b71a077c7fd505f2be5095 (diff) |
gnu: wxwidgets: Add wxWidgets without EGL.
Detected when working on Kicad-9. wxwidgets was built with EGL but
Kicad was unable to create the OpenGL context. According to Debian:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024147;msg=5>
This happens due to Glew having EGL disabled, and would break packages
that use both `wxwidgets` and `glew` together. We already detected the
issue with PrusaSlicer, that's why we had a separate package for it, but
it also needed extra unrelated changes.
* gnu/packages/wxwidgets.scm (wxwidgets-sans-egl): Add it.
(prusa-wxwidgets): Inherit from it.
Change-Id: Idde2985501b4d06cbb5bbd92030d5516bf7bea07
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/wxwidgets.scm | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 11c2ac2154..92278f907a 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2023 Andreas Enge <[email protected]> ;;; Copyright © 2023 Malte Frank Gerdes <[email protected]> ;;; Copyright © 2023 Maxim Cournoyer <[email protected]> +;;; Copyright © 2025 Ekaitz Zarraga <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -180,6 +181,21 @@ and many other languages.") ((#:configure-flags flags #~'()) #~(append #$flags '("--with-gtk=2"))))))) +(define-public wxwidgets-sans-egl + ;; This is needed for prusaslicer: + ;; <https://github.com/NixOS/nixpkgs/issues/193135>.) + ;; and KiCAD: + ;; <https://forum.kicad.info/t/kicad-8-0-x-could-not-use-opengl-debian-guix/53203/7> + ;; Relevant debian bug report: + ;; <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024147;msg=5> + ;; Tl;dr; wxWidgets uses EGL but Glew 2.2 doesn't. Leading to errors. + (package/inherit wxwidgets + (name "wxwidgets-sans-egl") + (arguments + (substitute-keyword-arguments (package-arguments wxwidgets) + ((#:configure-flags flags) + #~(cons "--disable-glcanvasegl" #$flags)))))) + (define-public wxwidgets-3.0 (package (inherit wxwidgets) @@ -272,7 +288,7 @@ and many other languages.") (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26") (revision "0")) (package - (inherit wxwidgets) + (inherit wxwidgets-sans-egl) (name "prusa-wxwidgets") (version (git-version "3.2.0" revision commit)) (home-page "https://github.com/prusa3d/wxWidgets") @@ -293,11 +309,6 @@ and many other languages.") (prepend nanosvg))) (arguments (substitute-keyword-arguments (package-arguments wxwidgets) - ((#:configure-flags flags) - ;; To fix 3D rendering in PrusaSlicer, wxWidgets must be compiled with - ;; "--disable-glcanvasegl" flag (see - ;; <https://github.com/NixOS/nixpkgs/issues/193135>.) - #~(cons "--disable-glcanvasegl" #$flags)) ((#:phases phases) #~(modify-phases #$phases (add-after 'unpack 'copy-nanosvg-source |