aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/wxwidgets.scm
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2024-07-13 14:13:16 +0300
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-08-12 23:09:07 +0100
commit23fc353b3a5ad874b65c1b9d2ee55b2892db056c (patch)
tree2b0f4a5adc0d0cbfcd5f8b8301063b6a694fb21a /gnu/packages/wxwidgets.scm
parentccb3bdcbe2b3dcbead10f47e66916b2813fbccde (diff)
downloadguix-23fc353b3a5ad874b65c1b9d2ee55b2892db056c.tar.gz
guix-23fc353b3a5ad874b65c1b9d2ee55b2892db056c.zip
gnu: Add prusa-wxwidgets.
* gnu/packages/engineering.scm (prusa-wxwidgets): New variable. * gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register "prusa-wxwidgets-makefile-fix.patch". Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me> Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/wxwidgets.scm')
-rw-r--r--gnu/packages/wxwidgets.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 973e962fb1..11c2ac2154 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -46,6 +46,7 @@
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphics)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
@@ -265,6 +266,44 @@ and many other languages.")
(("-Wall") "-Wall -Wno-narrowing"))
#t)))))))
+(define-public prusa-wxwidgets
+ ;; There is no proper tag/release, all patches are in separate branches based on
+ ;; the wxWidgets release (e.g. this commit is taken from "v3.2.0-patched" branch".)
+ (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26")
+ (revision "0"))
+ (package
+ (inherit wxwidgets)
+ (name "prusa-wxwidgets")
+ (version (git-version "3.2.0" revision commit))
+ (home-page "https://github.com/prusa3d/wxWidgets")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ ;; The patch is taken from the NixOS nixpkgs repository (see
+ ;; <https://github.com/NixOS/nixpkgs/commit/0e724ac89f3dbf6ed31d647290a371b44a85e5ad>.)
+ (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
+ (sha256
+ (base32
+ "1xk6w7q4xv4cj906xa5dwam5q51mc8bszbkkz7l8d3wjmsz73rwv"))))
+ (native-inputs (modify-inputs (package-native-inputs wxwidgets)
+ (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
+ (lambda _
+ (copy-recursively #$(package-source nanosvg) "3rdparty/nanosvg/"))))))))))
+
(define-public python-wxpython
(package
(name "python-wxpython")