Subject: [PATCH] gnu: blender: Update to 4.3.2.

From: Jan Wielkiewicz <[email-masked]>
Date: Tue, 25 Feb 2025 19:00:51 +0100

* gnu/packages/graphics.scm (blender): Update to 4.3.2.
[arguments]<#:configure-flags>: Use python-next for
"-DPYTHON_LIBPATH=", "-DPYTHON_INCLUDE_DIR=".
Use python 3.10 libs from python-numpy for
"-DPYTHON_NUMPY_INCLUDE_DIRS=", "-DPYTHON_NUMPY_PATH=".
[native-inputs]: Add pkg-config.
[inputs]: Add fftwf, vulkan-headers, vulkan-loader, shaderc,
python-next. Remove python.

Change-Id: I5ded97728c45625a2f04f992755b3b75fc22d796
---
 gnu/packages/graphics.scm | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index df2d287eb8..acb57d1668 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2023 Eric Bavier <[email-masked]>
 ;;; Copyright © 2023, 2024 Artyom V. Poptsov <[email-masked]>
 ;;; Copyright © 2024 Ivan Vilata-i-Balaguer <[email-masked]>
+;;; Copyright © 2025 Jan Wielkiewicz <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -111,7 +112,7 @@ (define-module (gnu packages graphics)
   #:use-module (gnu packages plotutils)
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages pth)
-  #:use-module (gnu packages pulseaudio)  ; libsndfile, libsamplerate
+  #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
@@ -527,21 +528,21 @@ (define-public openvdb
 (define-public blender
   (package
     (name "blender")
-    (version "3.6.19")                   ;4.2.x+ requires Python >= 3.12
+    (version "4.3.2")                   ;4.2.x+ requires Python >= 3.12
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.blender.org/source/"
                                   "blender-" version ".tar.xz"))
               (sha256
                (base32
-                "0mx5q3kb3bgx8ni4qpy02gc4kx3cc1zqc5p5vkrdggis3rk3k76h"))))
+                "1n4nsqmzfd51kxd6w30bmfbj4qkh9ccg7x7szbh3253m697avmn8"))))
     (build-system cmake-build-system)
     (arguments
      (list
       ;; Test files are very large and not included in the release tarball.
       #:tests? #f
       #:configure-flags
-      (let ((python-version (version-major+minor (package-version python))))
+      (let ((python-version (version-major+minor (package-version python-next))))
         #~(list "-DWITH_CODEC_FFMPEG=ON"
                 "-DWITH_CODEC_SNDFILE=ON"
                 "-DWITH_CYCLES=ON"
@@ -562,19 +563,19 @@ (define-public blender
                 "-DWITH_SYSTEM_LZO=ON"
                 (string-append "-DPYTHON_LIBRARY=python" #$python-version)
                 (string-append "-DPYTHON_LIBPATH="
-                               (assoc-ref %build-inputs "python")
+                               (assoc-ref %build-inputs "python-next")
                                "/lib")
                 (string-append "-DPYTHON_INCLUDE_DIR="
-                               (assoc-ref %build-inputs "python")
+                               (assoc-ref %build-inputs "python-next")
                                "/include/python" #$python-version)
                 (string-append "-DPYTHON_VERSION=" #$python-version)
                 (string-append "-DPYTHON_NUMPY_INCLUDE_DIRS="
                                (assoc-ref %build-inputs "python-numpy")
-                               "/lib/python" #$python-version
+                               "/lib/python" "3.10" ; no 3.12 for numpy yet
                                "/site-packages/numpy/core/include/")
                 (string-append "-DPYTHON_NUMPY_PATH="
                                (assoc-ref %build-inputs "python-numpy")
-                               "/lib/python" #$python-version
+                               "/lib/python" "3.10" ; no 3.12 for numpy yet
                                "/site-packages/")))
       #:phases
       #~(modify-phases %standard-phases
@@ -584,6 +585,9 @@ (define-public blender
                      (python-path (getenv "GUIX_PYTHONPATH")))
                 (wrap-program (string-append out "/bin/blender")
                   `("GUIX_PYTHONPATH" ":" prefix (,python-path)))))))))
+    (native-inputs
+     (list
+      pkg-config))
     (inputs
      (list bash-minimal
            boost
@@ -592,10 +596,11 @@ (define-public blender
            embree
            ffmpeg-5
            fftw
+           fftwf
            freetype-with-brotli
            glew
            glog
-           gmp                        ;needed for boolean operations on meshes
+           gmp		      ;needed for boolean operations on meshes
            imath
            jack-1
            jemalloc
@@ -616,9 +621,12 @@ (define-public blender
            opensubdiv
            openvdb
            pugixml
-           python
+           python-next
            python-numpy
+           shaderc
            tbb
+           vulkan-headers
+           vulkan-loader
            zlib
            `(,zstd "lib")))
     (home-page "https://www.blender.org/")

base-commit: 5ccae0d1bf16c77466809671c17d410d4521a131
-- 
2.48.1