blender: 3.6.5 -> 4.0.1 (#267511)

As noted in comment, Blender is now using private libdecor APIs not in
the headers, so need to patch to build against it. I think it probably
works when Blender does dynamic loading at runtime since it uses the fn
defs it defines in that case, but we don’t want to do that, it seems (as
we already set `-DWITH_GHOST_WAYLAND_DYNLOAD=OFF`).

authored by

Andrew Marshall and committed by
GitHub
aa6db6ac c64a7d15

+43 -5
+9 -5
pkgs/applications/misc/blender/default.nix
··· 3 3 , libjpeg, libpng, libsamplerate, libsndfile 4 4 , libtiff, libwebp, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio, openjpeg, python310Packages 5 5 , openvdb, libXxf86vm, tbb, alembic 6 - , zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath 6 + , zlib, zstd, fftw, fftwFloat, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath 7 7 , jackaudioSupport ? false, libjack2 8 8 , cudaSupport ? config.cudaSupport, cudaPackages ? { } 9 9 , hipSupport ? false, rocmPackages # comes with a significantly larger closure size ··· 30 30 url = "https://developer.download.nvidia.com/redist/optix/v7.3/OptiX-7.3.0-Include.zip"; 31 31 sha256 = "0max1j4822mchj0xpz9lqzh91zkmvsn4py0r174cvqfz8z8ykjk8"; 32 32 }; 33 + libdecor' = libdecor.overrideAttrs (old: { 34 + # Blender uses private APIs, need to patch to expose them 35 + patches = (old.patches or [ ]) ++ [ ./libdecor.patch ]; 36 + }); 33 37 34 38 in 35 39 stdenv.mkDerivation (finalAttrs: rec { 36 40 pname = "blender"; 37 - version = "3.6.5"; 41 + version = "4.0.1"; 38 42 39 43 src = fetchurl { 40 44 url = "https://download.blender.org/source/${pname}-${version}.tar.xz"; 41 - hash = "sha256-QAHA/pn22HLsfH6VX4Sp7r25raFxAPS1Gergjez38kM="; 45 + hash = "sha256-/jLU0noX5RxhQ+26G16nGFylm65Lzfm9s11oCWCC43Q="; 42 46 }; 43 47 44 48 patches = [ ··· 53 57 buildInputs = 54 58 [ boost ffmpeg gettext glew ilmbase 55 59 freetype libjpeg libpng libsamplerate libsndfile libtiff libwebp 56 - opencolorio openexr openimageio openjpeg python zlib zstd fftw jemalloc 60 + opencolorio openexr openimageio openjpeg python zlib zstd fftw fftwFloat jemalloc 57 61 alembic 58 62 (opensubdiv.override { inherit cudaSupport; }) 59 63 tbb ··· 65 69 openpgl 66 70 ] 67 71 ++ lib.optionals waylandSupport [ 68 - wayland wayland-protocols libffi libdecor libxkbcommon dbus 72 + wayland wayland-protocols libffi libdecor' libxkbcommon dbus 69 73 ] 70 74 ++ lib.optionals (!stdenv.isAarch64) [ 71 75 openimagedenoise
+34
pkgs/applications/misc/blender/libdecor.patch
··· 1 + diff --git a/src/libdecor-plugin.h b/src/libdecor-plugin.h 2 + index ba80ce6..59199dd 100644 3 + --- a/src/libdecor-plugin.h 4 + +++ b/src/libdecor-plugin.h 5 + @@ -132,12 +132,6 @@ struct libdecor_plugin_interface { 6 + struct wl_surface * 7 + libdecor_frame_get_wl_surface(struct libdecor_frame *frame); 8 + 9 + -int 10 + -libdecor_frame_get_content_width(struct libdecor_frame *frame); 11 + - 12 + -int 13 + -libdecor_frame_get_content_height(struct libdecor_frame *frame); 14 + - 15 + enum libdecor_window_state 16 + libdecor_frame_get_window_state(struct libdecor_frame *frame); 17 + 18 + diff --git a/src/libdecor.h b/src/libdecor.h 19 + index af67e2f..b5eba41 100644 20 + --- a/src/libdecor.h 21 + +++ b/src/libdecor.h 22 + @@ -532,6 +532,12 @@ bool 23 + libdecor_configuration_get_window_state(struct libdecor_configuration *configuration, 24 + enum libdecor_window_state *window_state); 25 + 26 + +int 27 + +libdecor_frame_get_content_width(struct libdecor_frame *frame); 28 + + 29 + +int 30 + +libdecor_frame_get_content_height(struct libdecor_frame *frame); 31 + + 32 + #ifdef __cplusplus 33 + } 34 + #endif