mesa: 24.3.4 -> 25.0.0 (#383432)

authored by K900 and committed by GitHub ffe8d1b1 0ce9de03

+129 -168
+1 -1
pkgs/applications/emulators/wine/base.nix
··· 98 ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ] 99 ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] 100 ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ] 101 - ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ] 102 ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks 103 ++ lib.optionals (x11Support) (with pkgs.xorg; [ 104 libX11 libXcomposite libXcursor libXext libXfixes libXi libXrandr libXrender libXxf86vm
··· 98 ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ] 99 ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] 100 ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ] 101 + ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.libdrm ] 102 ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks 103 ++ lib.optionals (x11Support) (with pkgs.xorg; [ 104 libX11 libXcomposite libXcursor libXext libXfixes libXi libXrandr libXrender libXxf86vm
+2 -2
pkgs/applications/video/kodi/unwrapped.nix
··· 18 , libcrossguid, libmicrohttpd 19 , bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn2, libpthreadstubs, libtasn1 20 , libplist, p11-kit, zlib, flatbuffers, fstrcmp, rapidjson 21 - , lirc, mesa 22 , x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp 23 , dbusSupport ? true, dbus 24 , joystickSupport ? true, cwiid ··· 122 bluez giflib glib harfbuzz lcms2 libpthreadstubs 123 ffmpeg flatbuffers fstrcmp rapidjson 124 lirc 125 - mesa # uses eglext_angle.h, which is not provided by glvnd 126 ] 127 ++ lib.optionals x11Support [ 128 libX11 xorgproto libXt libXmu libXext.dev libXdmcp
··· 18 , libcrossguid, libmicrohttpd 19 , bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn2, libpthreadstubs, libtasn1 20 , libplist, p11-kit, zlib, flatbuffers, fstrcmp, rapidjson 21 + , lirc, mesa-gl-headers 22 , x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp 23 , dbusSupport ? true, dbus 24 , joystickSupport ? true, cwiid ··· 122 bluez giflib glib harfbuzz lcms2 libpthreadstubs 123 ffmpeg flatbuffers fstrcmp rapidjson 124 lirc 125 + mesa-gl-headers 126 ] 127 ++ lib.optionals x11Support [ 128 libX11 xorgproto libXt libXmu libXext.dev libXdmcp
+2 -2
pkgs/by-name/he/hey-mail/package.nix
··· 21 wrapGAppsHook3, 22 writeScript, 23 atk, 24 - mesa, 25 cups, 26 systemd, 27 alsa-lib, ··· 53 libxkbcommon 54 libGL 55 atk 56 - mesa 57 cups 58 systemd 59 alsa-lib
··· 21 wrapGAppsHook3, 22 writeScript, 23 atk, 24 + libgbm, 25 cups, 26 systemd, 27 alsa-lib, ··· 53 libxkbcommon 54 libGL 55 atk 56 + libgbm 57 cups 58 systemd 59 alsa-lib
+4 -2
pkgs/by-name/ma/magpie/package.nix
··· 25 libXtst, 26 libinput, 27 libdrm, 28 gsettings-desktop-schemas, 29 glib, 30 gtk3, ··· 32 pipewire, 33 libgudev, 34 libwacom, 35 - mesa, 36 meson, 37 nix-update-script, 38 validatePkgConfig, ··· 86 libXtst 87 libcap_ng 88 graphene 89 - mesa # actually uses eglmesaext 90 ]; 91 92 nativeBuildInputs = [ ··· 114 gtk3 115 libcanberra 116 libdrm 117 libgudev 118 libinput 119 libstartup_notification
··· 25 libXtst, 26 libinput, 27 libdrm, 28 + libgbm, 29 gsettings-desktop-schemas, 30 glib, 31 gtk3, ··· 33 pipewire, 34 libgudev, 35 libwacom, 36 + mesa-gl-headers, 37 meson, 38 nix-update-script, 39 validatePkgConfig, ··· 87 libXtst 88 libcap_ng 89 graphene 90 + mesa-gl-headers 91 ]; 92 93 nativeBuildInputs = [ ··· 115 gtk3 116 libcanberra 117 libdrm 118 + libgbm 119 libgudev 120 libinput 121 libstartup_notification
+4 -2
pkgs/by-name/mu/muffin/package.nix
··· 15 json-glib, 16 libcanberra, 17 libdrm, 18 libgnomekbd, 19 libgudev, 20 libinput, ··· 24 libXdamage, 25 libxkbcommon, 26 libXtst, 27 - mesa, 28 meson, 29 ninja, 30 pipewire, ··· 84 gtk3 85 libcanberra 86 libdrm 87 libgnomekbd 88 libgudev 89 libinput ··· 104 json-glib 105 libXtst 106 graphene 107 - mesa # actually uses eglmesaext 108 ]; 109 110 mesonFlags = [
··· 15 json-glib, 16 libcanberra, 17 libdrm, 18 + libgbm, 19 libgnomekbd, 20 libgudev, 21 libinput, ··· 25 libXdamage, 26 libxkbcommon, 27 libXtst, 28 + mesa-gl-headers, 29 meson, 30 ninja, 31 pipewire, ··· 85 gtk3 86 libcanberra 87 libdrm 88 + libgbm 89 libgnomekbd 90 libgudev 91 libinput ··· 106 json-glib 107 libXtst 108 graphene 109 + mesa-gl-headers 110 ]; 111 112 mesonFlags = [
+4 -2
pkgs/by-name/mu/mutter/package.nix
··· 36 libXau, 37 libinput, 38 libdrm, 39 libei, 40 libdisplay-info, 41 gsettings-desktop-schemas, ··· 50 libwacom, 51 libSM, 52 xwayland, 53 - mesa, 54 meson, 55 gnome-settings-daemon, 56 xorgserver, ··· 101 propagatedBuildInputs = [ 102 # required for pkg-config to detect mutter-mtk 103 graphene 104 - mesa # actually uses eglmesaext 105 ]; 106 107 nativeBuildInputs = [ ··· 133 harfbuzz 134 libcanberra 135 libdrm 136 libei 137 libdisplay-info 138 libGL
··· 36 libXau, 37 libinput, 38 libdrm, 39 + libgbm, 40 libei, 41 libdisplay-info, 42 gsettings-desktop-schemas, ··· 51 libwacom, 52 libSM, 53 xwayland, 54 + mesa-gl-headers, 55 meson, 56 gnome-settings-daemon, 57 xorgserver, ··· 102 propagatedBuildInputs = [ 103 # required for pkg-config to detect mutter-mtk 104 graphene 105 + mesa-gl-headers 106 ]; 107 108 nativeBuildInputs = [ ··· 134 harfbuzz 135 libcanberra 136 libdrm 137 + libgbm 138 libei 139 libdisplay-info 140 libGL
+4 -2
pkgs/by-name/mu/mutter46/package.nix
··· 34 libXau, 35 libinput, 36 libdrm, 37 libei, 38 libdisplay-info, 39 gsettings-desktop-schemas, ··· 48 libwacom, 49 libSM, 50 xwayland, 51 - mesa, 52 meson, 53 gnome-settings-daemon, 54 xorgserver, ··· 97 propagatedBuildInputs = [ 98 # required for pkg-config to detect mutter-mtk 99 graphene 100 - mesa # actually uses eglmesaext 101 ]; 102 103 nativeBuildInputs = [ ··· 128 harfbuzz 129 libcanberra 130 libdrm 131 libei 132 libdisplay-info 133 libgudev
··· 34 libXau, 35 libinput, 36 libdrm, 37 + libgbm, 38 libei, 39 libdisplay-info, 40 gsettings-desktop-schemas, ··· 49 libwacom, 50 libSM, 51 xwayland, 52 + mesa-gl-headers, 53 meson, 54 gnome-settings-daemon, 55 xorgserver, ··· 98 propagatedBuildInputs = [ 99 # required for pkg-config to detect mutter-mtk 100 graphene 101 + mesa-gl-headers 102 ]; 103 104 nativeBuildInputs = [ ··· 129 harfbuzz 130 libcanberra 131 libdrm 132 + libgbm 133 libei 134 libdisplay-info 135 libgudev
+2 -10
pkgs/by-name/or/orca-slicer/package.nix
··· 27 hicolor-icon-theme, 28 ilmbase, 29 libpng, 30 - mesa, 31 mpfr, 32 nlopt, 33 opencascade-occt_7_6, ··· 107 hicolor-icon-theme 108 ilmbase 109 libpng 110 - mesa 111 - mesa.osmesa 112 - mesa.drivers 113 mpfr 114 nlopt 115 opencascade-occt_7_6 ··· 129 ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch 130 # Link opencv_core and opencv_imgproc instead of opencv_world 131 ./patches/dont-link-opencv-world-orca.patch 132 # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged 133 # Allows disabling the update nag screen 134 (fetchpatch { ··· 169 170 NIX_LDFLAGS = toString [ 171 (lib.optionalString withSystemd "-ludev") 172 - "-L${mesa.osmesa}/lib" 173 - "-L${mesa.drivers}/lib" 174 "-L${boost186}/lib" 175 "-lboost_log" 176 "-lboost_log_setup" ··· 194 "-DBOOST_LOG_NO_LIB=OFF" 195 "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION" 196 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed" 197 - "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib" 198 "-DORCA_VERSION_CHECK_DEFAULT=OFF" 199 ]; 200 ··· 202 gappsWrapperArgs+=( 203 --prefix LD_LIBRARY_PATH : "$out/lib:${ 204 lib.makeLibraryPath [ 205 - mesa.drivers 206 - mesa.osmesa 207 glew 208 ] 209 }" 210 - --prefix LIBGL_DRIVERS_PATH : "${mesa.drivers}/lib/dri" 211 --set WEBKIT_DISABLE_COMPOSITING_MODE 1 212 ) 213 '';
··· 27 hicolor-icon-theme, 28 ilmbase, 29 libpng, 30 mpfr, 31 nlopt, 32 opencascade-occt_7_6, ··· 106 hicolor-icon-theme 107 ilmbase 108 libpng 109 mpfr 110 nlopt 111 opencascade-occt_7_6 ··· 125 ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch 126 # Link opencv_core and opencv_imgproc instead of opencv_world 127 ./patches/dont-link-opencv-world-orca.patch 128 + # Don't link osmesa 129 + ./patches/no-osmesa.patch 130 # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged 131 # Allows disabling the update nag screen 132 (fetchpatch { ··· 167 168 NIX_LDFLAGS = toString [ 169 (lib.optionalString withSystemd "-ludev") 170 "-L${boost186}/lib" 171 "-lboost_log" 172 "-lboost_log_setup" ··· 190 "-DBOOST_LOG_NO_LIB=OFF" 191 "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION" 192 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed" 193 "-DORCA_VERSION_CHECK_DEFAULT=OFF" 194 ]; 195 ··· 197 gappsWrapperArgs+=( 198 --prefix LD_LIBRARY_PATH : "$out/lib:${ 199 lib.makeLibraryPath [ 200 glew 201 ] 202 }" 203 --set WEBKIT_DISABLE_COMPOSITING_MODE 1 204 ) 205 '';
+13
pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch
···
··· 1 + diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt 2 + index e695acd48..174e233e6 100644 3 + --- a/src/slic3r/CMakeLists.txt 4 + +++ b/src/slic3r/CMakeLists.txt 5 + @@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") 6 + FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl) 7 + FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client) 8 + find_package(CURL REQUIRED) 9 + - target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa) 10 + + target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES}) 11 + target_link_libraries(libslic3r_gui 12 + OpenGL::EGL 13 + ${WAYLAND_SERVER_LIBRARIES}
-2
pkgs/by-name/qq/qqmusic/package.nix
··· 21 libdbusmenu, 22 libglvnd, 23 libpulseaudio, 24 - mesa, 25 nspr, 26 nss, 27 pango, ··· 62 libdbusmenu 63 libglvnd 64 libpulseaudio 65 - mesa 66 nspr 67 nss 68 pango
··· 21 libdbusmenu, 22 libglvnd, 23 libpulseaudio, 24 nspr, 25 nss, 26 pango, ··· 61 libdbusmenu 62 libglvnd 63 libpulseaudio 64 nspr 65 nss 66 pango
+4 -2
pkgs/desktops/enlightenment/efl/default.nix
··· 27 jbig2dec, 28 libGL, 29 libdrm, 30 libinput, 31 libjpeg, 32 libpng, ··· 40 libxkbcommon, 41 lua, 42 lz4, 43 - mesa, 44 mint-x-icons, 45 openjpeg, 46 openssl, ··· 91 libsndfile 92 libtiff 93 lz4 94 - mesa # actually uses eglmesaext 95 openssl 96 systemd 97 udev ··· 118 hicolor-icon-theme # for the icon theme 119 jbig2dec 120 libdrm 121 libinput 122 libjpeg 123 libraw
··· 27 jbig2dec, 28 libGL, 29 libdrm, 30 + libgbm, 31 libinput, 32 libjpeg, 33 libpng, ··· 41 libxkbcommon, 42 lua, 43 lz4, 44 + mesa-gl-headers, 45 mint-x-icons, 46 openjpeg, 47 openssl, ··· 92 libsndfile 93 libtiff 94 lz4 95 + mesa-gl-headers 96 openssl 97 systemd 98 udev ··· 119 hicolor-icon-theme # for the icon theme 120 jbig2dec 121 libdrm 122 + libgbm 123 libinput 124 libjpeg 125 libraw
+1
pkgs/development/libraries/arrayfire/default.nix
··· 245 chessai 246 twesterhout 247 ]; 248 }; 249 }
··· 245 chessai 246 twesterhout 247 ]; 248 + broken = true; 249 }; 250 }
+4 -2
pkgs/development/libraries/cogl/default.nix
··· 14 gobject-introspection, 15 wayland, 16 gnome, 17 - mesa, 18 automake, 19 autoconf, 20 gstreamerSupport ? false, ··· 86 ] 87 ++ lib.optionals stdenv.hostPlatform.isLinux [ 88 wayland 89 - mesa # actually uses eglmesaext 90 libGL 91 xorg.libXrandr 92 xorg.libXfixes
··· 14 gobject-introspection, 15 wayland, 16 gnome, 17 + libgbm, 18 + mesa-gl-headers, 19 automake, 20 autoconf, 21 gstreamerSupport ? false, ··· 87 ] 88 ++ lib.optionals stdenv.hostPlatform.isLinux [ 89 wayland 90 + libgbm 91 + mesa-gl-headers 92 libGL 93 xorg.libXrandr 94 xorg.libXfixes
+2 -2
pkgs/development/libraries/mesa/common.nix
··· 5 # nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa 6 rec { 7 pname = "mesa"; 8 - version = "24.3.4"; 9 10 src = fetchFromGitLab { 11 domain = "gitlab.freedesktop.org"; 12 owner = "mesa"; 13 repo = "mesa"; 14 rev = "mesa-${version}"; 15 - hash = "sha256-1RUHbTgcCxdDrWjqB0EG4Ny/nwdjQHHpyPauiW/yogU="; 16 }; 17 18 meta = {
··· 5 # nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa 6 rec { 7 pname = "mesa"; 8 + version = "25.0.1"; 9 10 src = fetchFromGitLab { 11 domain = "gitlab.freedesktop.org"; 12 owner = "mesa"; 13 repo = "mesa"; 14 rev = "mesa-${version}"; 15 + hash = "sha256-9D4d7EEdZysvXDRcmpbyt85Lo64sldNRomp6/HUVORo="; 16 }; 17 18 meta = {
-90
pkgs/development/libraries/mesa/cross_clc.patch
··· 1 - commit f063e9f74b45f34e4ac570a90901253bf8e64efd 2 - Author: Mary Guillemard <mary.guillemard@collabora.com> 3 - Date: 2024-12-02 09:11:35 +0100 4 - 5 - meson: Add mesa-clc and install-mesa-clc options 6 - 7 - Due to the cross build issues in current meson, we adds new options to 8 - allow mesa_clc and vtn_bindgen to be installed or searched on the 9 - system. 10 - 11 - Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> 12 - Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> 13 - Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> 14 - Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719> 15 - 16 - diff --git a/meson.build b/meson.build 17 - index de9c9af53a1..e37325ec176 100644 18 - --- a/meson.build 19 - +++ b/meson.build 20 - @@ -808,7 +808,7 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') 21 - endif 22 - 23 - with_clover_spirv = with_gallium_clover and get_option('opencl-spirv') 24 - -with_clc = with_microsoft_clc or with_intel_clc or with_gallium_asahi or with_asahi_vk or with_gallium_rusticl or with_clover_spirv 25 - +with_clc = get_option('mesa-clc') != 'auto' or with_microsoft_clc or with_intel_clc or with_gallium_asahi or with_asahi_vk or with_gallium_rusticl 26 - 27 - dep_clc = null_dep 28 - if with_gallium_clover or with_clc 29 - diff --git a/meson_options.txt b/meson_options.txt 30 - index 79ee65e6094..8f22b36e5fb 100644 31 - --- a/meson_options.txt 32 - +++ b/meson_options.txt 33 - @@ -744,3 +744,20 @@ option( 34 - 'none', 'dri2' 35 - ], 36 - ) 37 - + 38 - +option( 39 - + 'mesa-clc', 40 - + type : 'combo', 41 - + value : 'auto', 42 - + choices : [ 43 - + 'enabled', 'system', 'auto' 44 - + ], 45 - + description : 'Build the mesa-clc compiler or use a system version.' 46 - +) 47 - + 48 - +option( 49 - + 'install-mesa-clc', 50 - + type : 'boolean', 51 - + value : false, 52 - + description : 'Install the mesa-clc compiler (if needed for cross builds).' 53 - +) 54 - diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build 55 - index 74767d08de2..4875d71ca21 100644 56 - --- a/src/compiler/clc/meson.build 57 - +++ b/src/compiler/clc/meson.build 58 - @@ -117,15 +117,20 @@ idep_mesaclc = declare_dependency( 59 - link_args : _idep_mesaclc_link_args, 60 - ) 61 - 62 - -prog_mesa_clc = executable( 63 - - 'mesa_clc', 64 - - ['mesa_clc.c'], 65 - - include_directories : [inc_include, inc_src], 66 - - c_args : [pre_args, no_override_init_args], 67 - - link_args : [ld_args_build_id], 68 - - dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_getopt], 69 - - # If we can run host binaries directly, just build mesa_clc for the host. 70 - - # Most commonly this happens when doing a cross compile from an x86_64 build 71 - - # machine to an x86 host 72 - - native : not meson.can_run_host_binaries(), 73 - -) 74 - +if get_option('mesa-clc') == 'system' 75 - + prog_mesa_clc = find_program('mesa_clc', native : true) 76 - +else 77 - + prog_mesa_clc = executable( 78 - + 'mesa_clc', 79 - + ['mesa_clc.c'], 80 - + include_directories : [inc_include, inc_src], 81 - + c_args : [pre_args, no_override_init_args], 82 - + link_args : [ld_args_build_id], 83 - + dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_getopt], 84 - + # If we can run host binaries directly, just build mesa_clc for the host. 85 - + # Most commonly this happens when doing a cross compile from an x86_64 build 86 - + # machine to an x86 host 87 - + native : not meson.can_run_host_binaries(), 88 - + install : get_option('install-mesa-clc'), 89 - + ) 90 - +endif
···
-12
pkgs/development/libraries/mesa/darwin.nix
··· 27 meta 28 ; 29 30 - # Darwin build fixes. FIXME: remove in 25.1. 31 - patches = [ 32 - (fetchpatch { 33 - url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/e89eba0796b3469f1d2cdbb600309f6231a8169d.patch"; 34 - hash = "sha256-0EP0JsYy+UTQ+eGd3sMfoLf1R+2e8n1flmQAHq3rCR4="; 35 - }) 36 - (fetchpatch { 37 - url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/568a4ca899762fe96fc9b34d2288d07e6656af87.patch"; 38 - hash = "sha256-uLxa5vA3/cYAIJT9h7eBQ1EBu4MnMg9R5uGAHzTb5Fc="; 39 - }) 40 - ]; 41 - 42 outputs = [ 43 "out" 44 "dev"
··· 27 meta 28 ; 29 30 outputs = [ 31 "out" 32 "dev"
+41 -28
pkgs/development/libraries/mesa/default.nix
··· 91 "intel-nullhw" 92 ] 93 , mesa 94 , makeSetupHook 95 }: 96 ··· 138 139 patches = [ 140 ./opencl.patch 141 - # cherry-picked from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719 142 - # safe to remove for versions > 24.3.2 143 - ./cross_clc.patch 144 ]; 145 146 postPatch = '' ··· 154 substituteInPlace src/amd/vulkan/meson.build --replace \ 155 "get_option('datadir')" "'${placeholder "out"}/share'" 156 157 ${copyRustDeps} 158 ''; 159 160 outputs = [ 161 - "out" "dev" "drivers" "driversdev" "opencl" "teflon" "osmesa" 162 # the Dozen drivers depend on libspirv2dxil, but link it statically, and 163 # libspirv2dxil itself is pretty chonky, so relocate it to its own output in 164 # case anything wants to use it at some point 165 "spirv2dxil" 166 ]; 167 168 # Keep build-ids so drivers can use them for caching, etc. ··· 196 # Enable glvnd for dynamic libGL dispatch 197 (lib.mesonEnable "glvnd" true) 198 199 - (lib.mesonBool "gallium-nine" true) # Direct3D in Wine 200 - (lib.mesonBool "osmesa" true) # used by wine 201 (lib.mesonBool "teflon" true) # TensorFlow frontend 202 203 # Enable all freedreno kernel mode drivers. (For example, virtio can be ··· 206 (lib.mesonOption "freedreno-kmds" "msm,kgsl,virtio,wsl") 207 208 # Enable Intel RT stuff when available 209 - (lib.mesonBool "install-intel-clc" true) 210 - (lib.mesonBool "install-mesa-clc" true) 211 (lib.mesonEnable "intel-rt" stdenv.hostPlatform.isx86_64) 212 (lib.mesonOption "clang-libdir" "${lib.getLib llvmPackages.clang-unwrapped}/lib") 213 214 # Clover, old OpenCL frontend 215 (lib.mesonOption "gallium-opencl" "icd") 216 - (lib.mesonBool "opencl-spirv" true) 217 218 # Rusticl, new OpenCL frontend 219 (lib.mesonBool "gallium-rusticl" true) ··· 221 # meson auto_features enables this, but we do not want it 222 (lib.mesonEnable "android-libbacktrace" false) 223 (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) 224 (lib.mesonEnable "valgrind" withValgrind) 225 ] ++ lib.optionals enablePatentEncumberedCodecs [ 226 (lib.mesonOption "video-codecs" "all") 227 ] ++ lib.optionals needNativeCLC [ 228 - (lib.mesonOption "intel-clc" "system") 229 (lib.mesonOption "mesa-clc" "system") 230 ]; 231 232 strictDeps = true; ··· 295 wayland-scanner 296 ] ++ lib.optionals needNativeCLC [ 297 # `or null` to not break eval with `attribute missing` on darwin to linux cross 298 - (buildPackages.mesa.driversdev or null) 299 ]; 300 301 disallowedRequisites = lib.optionals needNativeCLC [ 302 - (buildPackages.mesa.driversdev or null) 303 ]; 304 305 propagatedBuildInputs = [ libdrm ]; ··· 308 309 postInstall = '' 310 # Move driver-related bits to $drivers 311 moveToOutput "lib/gbm" $drivers 312 moveToOutput "lib/lib*_mesa*" $drivers 313 moveToOutput "lib/libgallium*" $drivers 314 moveToOutput "lib/libglapi*" $drivers 315 moveToOutput "lib/libpowervr_rogue*" $drivers 316 moveToOutput "lib/libvulkan_*" $drivers 317 - moveToOutput "lib/libxatracker*" $drivers 318 319 # Update search path used by glvnd (it's pointing to $out but drivers are in $drivers) 320 for js in $drivers/share/glvnd/egl_vendor.d/*.json; do ··· 337 echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd 338 echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd 339 340 - moveToOutput bin/intel_clc $driversdev 341 - moveToOutput bin/mesa_clc $driversdev 342 - moveToOutput lib/gallium-pipe $opencl 343 moveToOutput "lib/lib*OpenCL*" $opencl 344 - moveToOutput "lib/libOSMesa*" $osmesa 345 moveToOutput bin/spirv2dxil $spirv2dxil 346 moveToOutput "lib/libspirv_to_dxil*" $spirv2dxil 347 - moveToOutput lib/libteflon.so $teflon 348 ''; 349 350 postFixup = '' ··· 356 # remove pkgconfig files for GL/EGL; they are provided by libGL. 357 rm -f $dev/lib/pkgconfig/{gl,egl}.pc 358 359 - # Move development files for libraries in $drivers to $driversdev 360 - mkdir -p $driversdev/include 361 - mv $dev/include/xa_* $dev/include/d3d* -t $driversdev/include || true 362 - mkdir -p $driversdev/lib/pkgconfig 363 - for pc in lib/pkgconfig/{xatracker,d3d}.pc; do 364 - if [ -f "$dev/$pc" ]; then 365 - substituteInPlace "$dev/$pc" --replace $out $drivers 366 - mv $dev/$pc $driversdev/$pc 367 - fi 368 done 369 370 # update symlinks pointing to libgallium in $out ··· 392 393 env.NIX_CFLAGS_COMPILE = toString ([ 394 "-UPIPE_SEARCH_DIR" 395 - "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" 396 ]); 397 398 passthru = {
··· 91 "intel-nullhw" 92 ] 93 , mesa 94 + , mesa-gl-headers 95 , makeSetupHook 96 }: 97 ··· 139 140 patches = [ 141 ./opencl.patch 142 ]; 143 144 postPatch = '' ··· 152 substituteInPlace src/amd/vulkan/meson.build --replace \ 153 "get_option('datadir')" "'${placeholder "out"}/share'" 154 155 + for header in ${toString mesa-gl-headers.headers}; do 156 + if ! diff -q $header ${mesa-gl-headers}/$header; then 157 + echo "File $header does not match between mesa and mesa-gl-headers, please update mesa-gl-headers first!" 158 + exit 42 159 + fi 160 + done 161 + 162 ${copyRustDeps} 163 ''; 164 165 outputs = [ 166 + "out" "dev" 167 + "drivers" 168 + # OpenCL drivers pull in ~1G of extra LLVM stuff, so don't install them 169 + # if the user didn't explicitly ask for it 170 + "opencl" 171 # the Dozen drivers depend on libspirv2dxil, but link it statically, and 172 # libspirv2dxil itself is pretty chonky, so relocate it to its own output in 173 # case anything wants to use it at some point 174 "spirv2dxil" 175 + # tools for the host platform to be used when cross-compiling 176 + "cross_tools" 177 ]; 178 179 # Keep build-ids so drivers can use them for caching, etc. ··· 207 # Enable glvnd for dynamic libGL dispatch 208 (lib.mesonEnable "glvnd" true) 209 210 + (lib.mesonBool "gallium-nine" false) # Direct3D9 in Wine, largely supplanted by DXVK 211 + (lib.mesonBool "osmesa" false) # deprecated upstream 212 + (lib.mesonEnable "gallium-xa" false) # old and mostly dead 213 + 214 (lib.mesonBool "teflon" true) # TensorFlow frontend 215 216 # Enable all freedreno kernel mode drivers. (For example, virtio can be ··· 219 (lib.mesonOption "freedreno-kmds" "msm,kgsl,virtio,wsl") 220 221 # Enable Intel RT stuff when available 222 (lib.mesonEnable "intel-rt" stdenv.hostPlatform.isx86_64) 223 + 224 + # Required for OpenCL 225 (lib.mesonOption "clang-libdir" "${lib.getLib llvmPackages.clang-unwrapped}/lib") 226 227 # Clover, old OpenCL frontend 228 (lib.mesonOption "gallium-opencl" "icd") 229 230 # Rusticl, new OpenCL frontend 231 (lib.mesonBool "gallium-rusticl" true) ··· 233 # meson auto_features enables this, but we do not want it 234 (lib.mesonEnable "android-libbacktrace" false) 235 (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) 236 + 237 + # Build and install extra tools for cross 238 + (lib.mesonBool "install-mesa-clc" true) 239 + (lib.mesonBool "install-precomp-compiler" true) 240 + 241 + # Disable valgrind on targets where it's not available 242 (lib.mesonEnable "valgrind" withValgrind) 243 ] ++ lib.optionals enablePatentEncumberedCodecs [ 244 (lib.mesonOption "video-codecs" "all") 245 ] ++ lib.optionals needNativeCLC [ 246 (lib.mesonOption "mesa-clc" "system") 247 + (lib.mesonOption "precomp-compiler" "system") 248 ]; 249 250 strictDeps = true; ··· 313 wayland-scanner 314 ] ++ lib.optionals needNativeCLC [ 315 # `or null` to not break eval with `attribute missing` on darwin to linux cross 316 + (buildPackages.mesa.cross_tools or null) 317 ]; 318 319 disallowedRequisites = lib.optionals needNativeCLC [ 320 + (buildPackages.mesa.cross_tools or null) 321 ]; 322 323 propagatedBuildInputs = [ libdrm ]; ··· 326 327 postInstall = '' 328 # Move driver-related bits to $drivers 329 + moveToOutput "lib/gallium-pipe" $drivers 330 moveToOutput "lib/gbm" $drivers 331 moveToOutput "lib/lib*_mesa*" $drivers 332 moveToOutput "lib/libgallium*" $drivers 333 moveToOutput "lib/libglapi*" $drivers 334 moveToOutput "lib/libpowervr_rogue*" $drivers 335 moveToOutput "lib/libvulkan_*" $drivers 336 + moveToOutput "lib/libteflon.so" $drivers 337 338 # Update search path used by glvnd (it's pointing to $out but drivers are in $drivers) 339 for js in $drivers/share/glvnd/egl_vendor.d/*.json; do ··· 356 echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd 357 echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd 358 359 + moveToOutput bin/intel_clc $cross_tools 360 + moveToOutput bin/mesa_clc $cross_tools 361 + moveToOutput bin/vtn_bindgen $cross_tools 362 + 363 moveToOutput "lib/lib*OpenCL*" $opencl 364 + 365 moveToOutput bin/spirv2dxil $spirv2dxil 366 moveToOutput "lib/libspirv_to_dxil*" $spirv2dxil 367 ''; 368 369 postFixup = '' ··· 375 # remove pkgconfig files for GL/EGL; they are provided by libGL. 376 rm -f $dev/lib/pkgconfig/{gl,egl}.pc 377 378 + # remove headers moved to mesa-gl-headers 379 + for header in ${toString mesa-gl-headers.headers}; do 380 + rm -f $dev/$header 381 done 382 383 # update symlinks pointing to libgallium in $out ··· 405 406 env.NIX_CFLAGS_COMPILE = toString ([ 407 "-UPIPE_SEARCH_DIR" 408 + "-DPIPE_SEARCH_DIR=\"${placeholder "drivers"}/lib/gallium-pipe\"" 409 ]); 410 411 passthru = {
+39
pkgs/development/libraries/mesa/headers.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitLab, 5 + }: 6 + 7 + let 8 + common = import ./common.nix { inherit lib fetchFromGitLab; }; 9 + headers = [ 10 + "include/EGL/eglext_angle.h" 11 + "include/EGL/eglmesaext.h" 12 + ]; 13 + in 14 + stdenv.mkDerivation rec { 15 + pname = "mesa-gl-headers"; 16 + 17 + # These are a bigger rebuild and don't change often, so keep them separate. 18 + version = "25.0.1"; 19 + 20 + src = fetchFromGitLab { 21 + domain = "gitlab.freedesktop.org"; 22 + owner = "mesa"; 23 + repo = "mesa"; 24 + rev = "mesa-${version}"; 25 + hash = "sha256-9D4d7EEdZysvXDRcmpbyt85Lo64sldNRomp6/HUVORo="; 26 + }; 27 + 28 + dontBuild = true; 29 + 30 + installPhase = '' 31 + for header in ${toString headers}; do 32 + install -Dm444 $header $out/$header 33 + done 34 + ''; 35 + 36 + passthru = { inherit headers; }; 37 + 38 + inherit (common) meta; 39 + }
-3
pkgs/development/python-modules/horizon-eda/default.nix
··· 1 { 2 buildPythonPackage, 3 horizon-eda, 4 - mesa, 5 pycairo, 6 python, 7 pythonOlder, ··· 24 disabled = pythonOlder "3.9"; 25 26 buildInputs = base.buildInputs ++ [ 27 - mesa 28 - mesa.osmesa 29 python 30 ]; 31
··· 1 { 2 buildPythonPackage, 3 horizon-eda, 4 pycairo, 5 python, 6 pythonOlder, ··· 23 disabled = pythonOlder "3.9"; 24 25 buildInputs = base.buildInputs ++ [ 26 python 27 ]; 28
-1
pkgs/servers/x11/xorg/overrides.nix
··· 604 }); 605 606 xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: { 607 - buildInputs = attrs.buildInputs ++ [ mesa mesa.driversdev llvm ]; # for libxatracker 608 env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address" ]; # gcc12 609 meta = attrs.meta // { 610 platforms = ["i686-linux" "x86_64-linux"];
··· 604 }); 605 606 xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: { 607 env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address" ]; # gcc12 608 meta = attrs.meta // { 609 platforms = ["i686-linux" "x86_64-linux"];
-2
pkgs/tools/X11/primus/lib.nix
··· 5 fetchpatch, 6 libX11, 7 libGL, 8 - mesa, 9 nvidia_x11 ? null, 10 libglvnd, 11 }: ··· 48 "LIBDIR=$(out)/lib" 49 "PRIMUS_libGLa=${aPackage}/lib/libGL.so" 50 "PRIMUS_libGLd=${libGL}/lib/libGL.so" 51 - "PRIMUS_LOAD_GLOBAL=${mesa}/lib/libglapi.so" 52 ]; 53 54 installPhase = ''
··· 5 fetchpatch, 6 libX11, 7 libGL, 8 nvidia_x11 ? null, 9 libglvnd, 10 }: ··· 47 "LIBDIR=$(out)/lib" 48 "PRIMUS_libGLa=${aPackage}/lib/libGL.so" 49 "PRIMUS_libGLd=${libGL}/lib/libGL.so" 50 ]; 51 52 installPhase = ''
+1
pkgs/top-level/all-packages.nix
··· 9905 mesa_i686 = pkgsi686Linux.mesa; # make it build on Hydra 9906 9907 libgbm = callPackage ../development/libraries/mesa/gbm.nix {}; 9908 9909 ## End libGL/libGLU/Mesa stuff 9910
··· 9905 mesa_i686 = pkgsi686Linux.mesa; # make it build on Hydra 9906 9907 libgbm = callPackage ../development/libraries/mesa/gbm.nix {}; 9908 + mesa-gl-headers = callPackage ../development/libraries/mesa/headers.nix {}; 9909 9910 ## End libGL/libGLU/Mesa stuff 9911
+1 -1
pkgs/top-level/python-packages.nix
··· 6099 hopcroftkarp = callPackage ../development/python-modules/hopcroftkarp { }; 6100 6101 horizon-eda = callPackage ../development/python-modules/horizon-eda { 6102 - inherit (pkgs) horizon-eda mesa; 6103 }; 6104 6105 howdoi = callPackage ../development/python-modules/howdoi { };
··· 6099 hopcroftkarp = callPackage ../development/python-modules/hopcroftkarp { }; 6100 6101 horizon-eda = callPackage ../development/python-modules/horizon-eda { 6102 + inherit (pkgs) horizon-eda; 6103 }; 6104 6105 howdoi = callPackage ../development/python-modules/howdoi { };