summaryrefslogtreecommitdiff
path: root/files/nixpkgs-patches
diff options
context:
space:
mode:
Diffstat (limited to 'files/nixpkgs-patches')
-rw-r--r--files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff36
-rw-r--r--files/nixpkgs-patches/383432.diff636
-rw-r--r--files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff80
3 files changed, 738 insertions, 14 deletions
diff --git a/files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff b/files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff
new file mode 100644
index 0000000..780acd3
--- /dev/null
+++ b/files/nixpkgs-patches/274ea258ee704724977160757ac4228ecb6eb31f.diff
@@ -0,0 +1,36 @@
+diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix
+index faa025a797f0b..96b996e4f38c6 100644
+--- a/pkgs/by-name/or/orca-slicer/package.nix
++++ b/pkgs/by-name/or/orca-slicer/package.nix
+@@ -3,6 +3,7 @@
+ lib,
+ binutils,
+ fetchFromGitHub,
++ fetchpatch,
+ cmake,
+ pkg-config,
+ wrapGAppsHook3,
+@@ -126,7 +127,15 @@ stdenv.mkDerivation rec {
+ patches = [
+ # Fix for webkitgtk linking
+ ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
++ # Link opencv_core and opencv_imgproc instead of opencv_world
+ ./patches/dont-link-opencv-world-orca.patch
++ # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged
++ # Allows disabling the update nag screen
++ (fetchpatch {
++ name = "pr-7650-configurable-update-check.patch";
++ url = "https://github.com/SoftFever/OrcaSlicer/commit/d10a06ae11089cd1f63705e87f558e9392f7a167.patch";
++ hash = "sha256-t4own5AwPsLYBsGA15id5IH1ngM0NSuWdFsrxMRXmTk=";
++ })
+ ];
+
+ doCheck = true;
+@@ -186,6 +195,7 @@ stdenv.mkDerivation rec {
+ "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION"
+ "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed"
+ "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib"
++ "-DORCA_VERSION_CHECK_DEFAULT=OFF"
+ ];
+
+ preFixup = ''
diff --git a/files/nixpkgs-patches/383432.diff b/files/nixpkgs-patches/383432.diff
index faa7e77..4f21af4 100644
--- a/files/nixpkgs-patches/383432.diff
+++ b/files/nixpkgs-patches/383432.diff
@@ -1,5 +1,387 @@
+diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix
+index c47a04e9e42c6..aaa53bb38c575 100644
+--- a/pkgs/applications/emulators/wine/base.nix
++++ b/pkgs/applications/emulators/wine/base.nix
+@@ -98,7 +98,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; }
+ ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ]
+ ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ]
+ ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ]
+- ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ]
++ ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.libdrm ]
+ ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks
+ ++ lib.optionals (x11Support) (with pkgs.xorg; [
+ libX11 libXcomposite libXcursor libXext libXfixes libXi libXrandr libXrender libXxf86vm
+diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix
+index 9cfcfc6072f4f..3974536067c13 100644
+--- a/pkgs/applications/video/kodi/unwrapped.nix
++++ b/pkgs/applications/video/kodi/unwrapped.nix
+@@ -18,7 +18,7 @@
+ , libcrossguid, libmicrohttpd
+ , bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn2, libpthreadstubs, libtasn1
+ , libplist, p11-kit, zlib, flatbuffers, fstrcmp, rapidjson
+-, lirc, mesa
++, lirc, mesa-gl-headers
+ , x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp
+ , dbusSupport ? true, dbus
+ , joystickSupport ? true, cwiid
+@@ -122,7 +122,7 @@ in stdenv.mkDerivation (finalAttrs: {
+ bluez giflib glib harfbuzz lcms2 libpthreadstubs
+ ffmpeg flatbuffers fstrcmp rapidjson
+ lirc
+- mesa # uses eglext_angle.h, which is not provided by glvnd
++ mesa-gl-headers
+ ]
+ ++ lib.optionals x11Support [
+ libX11 xorgproto libXt libXmu libXext.dev libXdmcp
+diff --git a/pkgs/by-name/he/hey-mail/package.nix b/pkgs/by-name/he/hey-mail/package.nix
+index 52b0add9188ea..b4e3f10b2995b 100644
+--- a/pkgs/by-name/he/hey-mail/package.nix
++++ b/pkgs/by-name/he/hey-mail/package.nix
+@@ -21,7 +21,7 @@
+ wrapGAppsHook3,
+ writeScript,
+ atk,
+- mesa,
++ libgbm,
+ cups,
+ systemd,
+ alsa-lib,
+@@ -53,7 +53,7 @@ let
+ libxkbcommon
+ libGL
+ atk
+- mesa
++ libgbm
+ cups
+ systemd
+ alsa-lib
+diff --git a/pkgs/by-name/ma/magpie/package.nix b/pkgs/by-name/ma/magpie/package.nix
+index 65ff728acba0c..35036b14319ca 100644
+--- a/pkgs/by-name/ma/magpie/package.nix
++++ b/pkgs/by-name/ma/magpie/package.nix
+@@ -25,6 +25,7 @@
+ libXtst,
+ libinput,
+ libdrm,
++ libgbm,
+ gsettings-desktop-schemas,
+ glib,
+ gtk3,
+@@ -32,7 +33,7 @@
+ pipewire,
+ libgudev,
+ libwacom,
+- mesa,
++ mesa-gl-headers,
+ meson,
+ nix-update-script,
+ validatePkgConfig,
+@@ -86,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
+ libXtst
+ libcap_ng
+ graphene
+- mesa # actually uses eglmesaext
++ mesa-gl-headers
+ ];
+
+ nativeBuildInputs = [
+@@ -114,6 +115,7 @@ stdenv.mkDerivation (finalAttrs: {
+ gtk3
+ libcanberra
+ libdrm
++ libgbm
+ libgudev
+ libinput
+ libstartup_notification
+diff --git a/pkgs/by-name/mu/muffin/package.nix b/pkgs/by-name/mu/muffin/package.nix
+index ad233c8a85aa1..e781647b9ad7e 100644
+--- a/pkgs/by-name/mu/muffin/package.nix
++++ b/pkgs/by-name/mu/muffin/package.nix
+@@ -15,6 +15,7 @@
+ json-glib,
+ libcanberra,
+ libdrm,
++ libgbm,
+ libgnomekbd,
+ libgudev,
+ libinput,
+@@ -24,7 +25,7 @@
+ libXdamage,
+ libxkbcommon,
+ libXtst,
+- mesa,
++ mesa-gl-headers,
+ meson,
+ ninja,
+ pipewire,
+@@ -84,6 +85,7 @@ stdenv.mkDerivation rec {
+ gtk3
+ libcanberra
+ libdrm
++ libgbm
+ libgnomekbd
+ libgudev
+ libinput
+@@ -104,7 +106,7 @@ stdenv.mkDerivation rec {
+ json-glib
+ libXtst
+ graphene
+- mesa # actually uses eglmesaext
++ mesa-gl-headers
+ ];
+
+ mesonFlags = [
+diff --git a/pkgs/by-name/mu/mutter/package.nix b/pkgs/by-name/mu/mutter/package.nix
+index 8480c9095b947..4e08097370b5e 100644
+--- a/pkgs/by-name/mu/mutter/package.nix
++++ b/pkgs/by-name/mu/mutter/package.nix
+@@ -36,6 +36,7 @@
+ libXau,
+ libinput,
+ libdrm,
++ libgbm,
+ libei,
+ libdisplay-info,
+ gsettings-desktop-schemas,
+@@ -50,7 +51,7 @@
+ libwacom,
+ libSM,
+ xwayland,
+- mesa,
++ mesa-gl-headers,
+ meson,
+ gnome-settings-daemon,
+ xorgserver,
+@@ -101,7 +102,7 @@ stdenv.mkDerivation (finalAttrs: {
+ propagatedBuildInputs = [
+ # required for pkg-config to detect mutter-mtk
+ graphene
+- mesa # actually uses eglmesaext
++ mesa-gl-headers
+ ];
+
+ nativeBuildInputs = [
+@@ -133,6 +134,7 @@ stdenv.mkDerivation (finalAttrs: {
+ harfbuzz
+ libcanberra
+ libdrm
++ libgbm
+ libei
+ libdisplay-info
+ libGL
+diff --git a/pkgs/by-name/mu/mutter46/package.nix b/pkgs/by-name/mu/mutter46/package.nix
+index 67079c173ab8d..b594ee5c8cf22 100644
+--- a/pkgs/by-name/mu/mutter46/package.nix
++++ b/pkgs/by-name/mu/mutter46/package.nix
+@@ -34,6 +34,7 @@
+ libXau,
+ libinput,
+ libdrm,
++ libgbm,
+ libei,
+ libdisplay-info,
+ gsettings-desktop-schemas,
+@@ -48,7 +49,7 @@
+ libwacom,
+ libSM,
+ xwayland,
+- mesa,
++ mesa-gl-headers,
+ meson,
+ gnome-settings-daemon,
+ xorgserver,
+@@ -97,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
+ propagatedBuildInputs = [
+ # required for pkg-config to detect mutter-mtk
+ graphene
+- mesa # actually uses eglmesaext
++ mesa-gl-headers
+ ];
+
+ nativeBuildInputs = [
+@@ -128,6 +129,7 @@ stdenv.mkDerivation (finalAttrs: {
+ harfbuzz
+ libcanberra
+ libdrm
++ libgbm
+ libei
+ libdisplay-info
+ libgudev
+diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix
+index 96b996e4f38c6..89e03d1d69977 100644
+--- a/pkgs/by-name/or/orca-slicer/package.nix
++++ b/pkgs/by-name/or/orca-slicer/package.nix
+@@ -27,7 +27,6 @@
+ hicolor-icon-theme,
+ ilmbase,
+ libpng,
+- mesa,
+ mpfr,
+ nlopt,
+ opencascade-occt_7_6,
+@@ -107,9 +106,6 @@ stdenv.mkDerivation rec {
+ hicolor-icon-theme
+ ilmbase
+ libpng
+- mesa
+- mesa.osmesa
+- mesa.drivers
+ mpfr
+ nlopt
+ opencascade-occt_7_6
+@@ -129,6 +125,8 @@ stdenv.mkDerivation rec {
+ ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
+ # Link opencv_core and opencv_imgproc instead of opencv_world
+ ./patches/dont-link-opencv-world-orca.patch
++ # Don't link osmesa
++ ./patches/no-osmesa.patch
+ # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged
+ # Allows disabling the update nag screen
+ (fetchpatch {
+@@ -169,8 +167,6 @@ stdenv.mkDerivation rec {
+
+ NIX_LDFLAGS = toString [
+ (lib.optionalString withSystemd "-ludev")
+- "-L${mesa.osmesa}/lib"
+- "-L${mesa.drivers}/lib"
+ "-L${boost186}/lib"
+ "-lboost_log"
+ "-lboost_log_setup"
+@@ -194,7 +190,6 @@ stdenv.mkDerivation rec {
+ "-DBOOST_LOG_NO_LIB=OFF"
+ "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION"
+ "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed"
+- "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib"
+ "-DORCA_VERSION_CHECK_DEFAULT=OFF"
+ ];
+
+@@ -202,12 +197,9 @@ stdenv.mkDerivation rec {
+ gappsWrapperArgs+=(
+ --prefix LD_LIBRARY_PATH : "$out/lib:${
+ lib.makeLibraryPath [
+- mesa.drivers
+- mesa.osmesa
+ glew
+ ]
+ }"
+- --prefix LIBGL_DRIVERS_PATH : "${mesa.drivers}/lib/dri"
+ --set WEBKIT_DISABLE_COMPOSITING_MODE 1
+ )
+ '';
+diff --git a/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch
+new file mode 100644
+index 0000000000000..09298b3e55b6d
+--- /dev/null
++++ b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch
+@@ -0,0 +1,13 @@
++diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
++index e695acd48..174e233e6 100644
++--- a/src/slic3r/CMakeLists.txt
+++++ b/src/slic3r/CMakeLists.txt
++@@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
++ FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl)
++ FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client)
++ find_package(CURL REQUIRED)
++- target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa)
+++ target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
++ target_link_libraries(libslic3r_gui
++ OpenGL::EGL
++ ${WAYLAND_SERVER_LIBRARIES}
+diff --git a/pkgs/by-name/qq/qqmusic/package.nix b/pkgs/by-name/qq/qqmusic/package.nix
+index 4faa34fd83a42..4e35c80b4a9ac 100644
+--- a/pkgs/by-name/qq/qqmusic/package.nix
++++ b/pkgs/by-name/qq/qqmusic/package.nix
+@@ -21,7 +21,6 @@
+ libdbusmenu,
+ libglvnd,
+ libpulseaudio,
+- mesa,
+ nspr,
+ nss,
+ pango,
+@@ -62,7 +61,6 @@ stdenv.mkDerivation (finalAttrs: {
+ libdbusmenu
+ libglvnd
+ libpulseaudio
+- mesa
+ nspr
+ nss
+ pango
+diff --git a/pkgs/desktops/enlightenment/efl/default.nix b/pkgs/desktops/enlightenment/efl/default.nix
+index 6e7b77e2089d4..fc5853479f467 100644
+--- a/pkgs/desktops/enlightenment/efl/default.nix
++++ b/pkgs/desktops/enlightenment/efl/default.nix
+@@ -27,6 +27,7 @@
+ jbig2dec,
+ libGL,
+ libdrm,
++ libgbm,
+ libinput,
+ libjpeg,
+ libpng,
+@@ -40,7 +41,7 @@
+ libxkbcommon,
+ lua,
+ lz4,
+- mesa,
++ mesa-gl-headers,
+ mint-x-icons,
+ openjpeg,
+ openssl,
+@@ -91,7 +92,7 @@ stdenv.mkDerivation rec {
+ libsndfile
+ libtiff
+ lz4
+- mesa # actually uses eglmesaext
++ mesa-gl-headers
+ openssl
+ systemd
+ udev
+@@ -118,6 +119,7 @@ stdenv.mkDerivation rec {
+ hicolor-icon-theme # for the icon theme
+ jbig2dec
+ libdrm
++ libgbm
+ libinput
+ libjpeg
+ libraw
+diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix
+index c33e6f4cbfe25..d0259c6016b29 100644
+--- a/pkgs/development/libraries/arrayfire/default.nix
++++ b/pkgs/development/libraries/arrayfire/default.nix
+@@ -245,5 +245,6 @@ stdenv.mkDerivation rec {
+ chessai
+ twesterhout
+ ];
++ broken = true;
+ };
+ }
+diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix
+index 469a33c8d713e..58164f4454a54 100644
+--- a/pkgs/development/libraries/cogl/default.nix
++++ b/pkgs/development/libraries/cogl/default.nix
+@@ -14,7 +14,8 @@
+ gobject-introspection,
+ wayland,
+ gnome,
+- mesa,
++ libgbm,
++ mesa-gl-headers,
+ automake,
+ autoconf,
+ gstreamerSupport ? false,
+@@ -86,7 +87,8 @@ stdenv.mkDerivation rec {
+ ]
+ ++ lib.optionals stdenv.hostPlatform.isLinux [
+ wayland
+- mesa # actually uses eglmesaext
++ libgbm
++ mesa-gl-headers
+ libGL
+ xorg.libXrandr
+ xorg.libXfixes
diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix
-index 8439861cf36c8..db33ea5d30751 100644
+index 8439861cf36c8..23e5104ffcf6f 100644
--- a/pkgs/development/libraries/mesa/common.nix
+++ b/pkgs/development/libraries/mesa/common.nix
@@ -5,14 +5,14 @@
@@ -7,7 +389,7 @@ index 8439861cf36c8..db33ea5d30751 100644
rec {
pname = "mesa";
- version = "24.3.4";
-+ version = "25.0.0";
++ version = "25.0.1";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
@@ -15,7 +397,7 @@ index 8439861cf36c8..db33ea5d30751 100644
repo = "mesa";
rev = "mesa-${version}";
- hash = "sha256-1RUHbTgcCxdDrWjqB0EG4Ny/nwdjQHHpyPauiW/yogU=";
-+ hash = "sha256-ut6fB2m850Bx08V43TZ0WNoeDLZov76FtYPz6UFFjvQ=";
++ hash = "sha256-9D4d7EEdZysvXDRcmpbyt85Lo64sldNRomp6/HUVORo=";
};
meta = {
@@ -139,10 +521,18 @@ index 55392071010a9..1a458523632ec 100644
"out"
"dev"
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
-index 633770b6862c8..c1e950c2e5167 100644
+index 633770b6862c8..3fe641b4476c0 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
-@@ -138,9 +138,6 @@ in stdenv.mkDerivation {
+@@ -91,6 +91,7 @@
+ "intel-nullhw"
+ ]
+ , mesa
++, mesa-gl-headers
+ , makeSetupHook
+ }:
+
+@@ -138,9 +139,6 @@ in stdenv.mkDerivation {
patches = [
./opencl.patch
@@ -152,7 +542,50 @@ index 633770b6862c8..c1e950c2e5167 100644
];
postPatch = ''
-@@ -206,14 +203,13 @@ in stdenv.mkDerivation {
+@@ -154,15 +152,28 @@ in stdenv.mkDerivation {
+ substituteInPlace src/amd/vulkan/meson.build --replace \
+ "get_option('datadir')" "'${placeholder "out"}/share'"
+
++ for header in ${toString mesa-gl-headers.headers}; do
++ if ! diff -q $header ${mesa-gl-headers}/$header; then
++ echo "File $header does not match between mesa and mesa-gl-headers, please update mesa-gl-headers first!"
++ exit 42
++ fi
++ done
++
+ ${copyRustDeps}
+ '';
+
+ outputs = [
+- "out" "dev" "drivers" "driversdev" "opencl" "teflon" "osmesa"
++ "out" "dev"
++ "drivers"
++ # OpenCL drivers pull in ~1G of extra LLVM stuff, so don't install them
++ # if the user didn't explicitly ask for it
++ "opencl"
+ # the Dozen drivers depend on libspirv2dxil, but link it statically, and
+ # libspirv2dxil itself is pretty chonky, so relocate it to its own output in
+ # case anything wants to use it at some point
+ "spirv2dxil"
++ # tools for the host platform to be used when cross-compiling
++ "cross_tools"
+ ];
+
+ # Keep build-ids so drivers can use them for caching, etc.
+@@ -196,8 +207,10 @@ in stdenv.mkDerivation {
+ # Enable glvnd for dynamic libGL dispatch
+ (lib.mesonEnable "glvnd" true)
+
+- (lib.mesonBool "gallium-nine" true) # Direct3D in Wine
+- (lib.mesonBool "osmesa" true) # used by wine
++ (lib.mesonBool "gallium-nine" false) # Direct3D9 in Wine, largely supplanted by DXVK
++ (lib.mesonBool "osmesa" false) # deprecated upstream
++ (lib.mesonEnable "gallium-xa" false) # old and mostly dead
++
+ (lib.mesonBool "teflon" true) # TensorFlow frontend
+
+ # Enable all freedreno kernel mode drivers. (For example, virtio can be
+@@ -206,14 +219,13 @@ in stdenv.mkDerivation {
(lib.mesonOption "freedreno-kmds" "msm,kgsl,virtio,wsl")
# Enable Intel RT stuff when available
@@ -169,7 +602,7 @@ index 633770b6862c8..c1e950c2e5167 100644
# Rusticl, new OpenCL frontend
(lib.mesonBool "gallium-rusticl" true)
-@@ -221,12 +217,18 @@ in stdenv.mkDerivation {
+@@ -221,12 +233,18 @@ in stdenv.mkDerivation {
# meson auto_features enables this, but we do not want it
(lib.mesonEnable "android-libbacktrace" false)
(lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
@@ -189,7 +622,21 @@ index 633770b6862c8..c1e950c2e5167 100644
];
strictDeps = true;
-@@ -308,6 +310,7 @@ in stdenv.mkDerivation {
+@@ -295,11 +313,11 @@ in stdenv.mkDerivation {
+ wayland-scanner
+ ] ++ lib.optionals needNativeCLC [
+ # `or null` to not break eval with `attribute missing` on darwin to linux cross
+- (buildPackages.mesa.driversdev or null)
++ (buildPackages.mesa.cross_tools or null)
+ ];
+
+ disallowedRequisites = lib.optionals needNativeCLC [
+- (buildPackages.mesa.driversdev or null)
++ (buildPackages.mesa.cross_tools or null)
+ ];
+
+ propagatedBuildInputs = [ libdrm ];
+@@ -308,13 +326,14 @@ in stdenv.mkDerivation {
postInstall = ''
# Move driver-related bits to $drivers
@@ -197,16 +644,54 @@ index 633770b6862c8..c1e950c2e5167 100644
moveToOutput "lib/gbm" $drivers
moveToOutput "lib/lib*_mesa*" $drivers
moveToOutput "lib/libgallium*" $drivers
-@@ -339,7 +342,7 @@ in stdenv.mkDerivation {
+ moveToOutput "lib/libglapi*" $drivers
+ moveToOutput "lib/libpowervr_rogue*" $drivers
+ moveToOutput "lib/libvulkan_*" $drivers
+- moveToOutput "lib/libxatracker*" $drivers
++ moveToOutput "lib/libteflon.so" $drivers
+
+ # Update search path used by glvnd (it's pointing to $out but drivers are in $drivers)
+ for js in $drivers/share/glvnd/egl_vendor.d/*.json; do
+@@ -337,14 +356,14 @@ in stdenv.mkDerivation {
+ echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd
+ echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd
- moveToOutput bin/intel_clc $driversdev
- moveToOutput bin/mesa_clc $driversdev
+- moveToOutput bin/intel_clc $driversdev
+- moveToOutput bin/mesa_clc $driversdev
- moveToOutput lib/gallium-pipe $opencl
-+ moveToOutput bin/vtn_bindgen $driversdev
++ moveToOutput bin/intel_clc $cross_tools
++ moveToOutput bin/mesa_clc $cross_tools
++ moveToOutput bin/vtn_bindgen $cross_tools
++
moveToOutput "lib/lib*OpenCL*" $opencl
- moveToOutput "lib/libOSMesa*" $osmesa
+- moveToOutput "lib/libOSMesa*" $osmesa
++
moveToOutput bin/spirv2dxil $spirv2dxil
-@@ -392,7 +395,7 @@ in stdenv.mkDerivation {
+ moveToOutput "lib/libspirv_to_dxil*" $spirv2dxil
+- moveToOutput lib/libteflon.so $teflon
+ '';
+
+ postFixup = ''
+@@ -356,15 +375,9 @@ in stdenv.mkDerivation {
+ # remove pkgconfig files for GL/EGL; they are provided by libGL.
+ rm -f $dev/lib/pkgconfig/{gl,egl}.pc
+
+- # Move development files for libraries in $drivers to $driversdev
+- mkdir -p $driversdev/include
+- mv $dev/include/xa_* $dev/include/d3d* -t $driversdev/include || true
+- mkdir -p $driversdev/lib/pkgconfig
+- for pc in lib/pkgconfig/{xatracker,d3d}.pc; do
+- if [ -f "$dev/$pc" ]; then
+- substituteInPlace "$dev/$pc" --replace $out $drivers
+- mv $dev/$pc $driversdev/$pc
+- fi
++ # remove headers moved to mesa-gl-headers
++ for header in ${toString mesa-gl-headers.headers}; do
++ rm -f $dev/$header
+ done
+
+ # update symlinks pointing to libgallium in $out
+@@ -392,7 +405,7 @@ in stdenv.mkDerivation {
env.NIX_CFLAGS_COMPILE = toString ([
"-UPIPE_SEARCH_DIR"
@@ -215,3 +700,126 @@ index 633770b6862c8..c1e950c2e5167 100644
]);
passthru = {
+diff --git a/pkgs/development/libraries/mesa/headers.nix b/pkgs/development/libraries/mesa/headers.nix
+new file mode 100644
+index 0000000000000..314e1ac5efadd
+--- /dev/null
++++ b/pkgs/development/libraries/mesa/headers.nix
+@@ -0,0 +1,39 @@
++{
++ lib,
++ stdenv,
++ fetchFromGitLab,
++}:
++
++let
++ common = import ./common.nix { inherit lib fetchFromGitLab; };
++ headers = [
++ "include/EGL/eglext_angle.h"
++ "include/EGL/eglmesaext.h"
++ ];
++in
++stdenv.mkDerivation rec {
++ pname = "mesa-gl-headers";
++
++ # These are a bigger rebuild and don't change often, so keep them separate.
++ version = "25.0.1";
++
++ src = fetchFromGitLab {
++ domain = "gitlab.freedesktop.org";
++ owner = "mesa";
++ repo = "mesa";
++ rev = "mesa-${version}";
++ hash = "sha256-9D4d7EEdZysvXDRcmpbyt85Lo64sldNRomp6/HUVORo=";
++ };
++
++ dontBuild = true;
++
++ installPhase = ''
++ for header in ${toString headers}; do
++ install -Dm444 $header $out/$header
++ done
++ '';
++
++ passthru = { inherit headers; };
++
++ inherit (common) meta;
++}
+diff --git a/pkgs/development/python-modules/horizon-eda/default.nix b/pkgs/development/python-modules/horizon-eda/default.nix
+index f1b64a71ae32b..e444dc2705ca2 100644
+--- a/pkgs/development/python-modules/horizon-eda/default.nix
++++ b/pkgs/development/python-modules/horizon-eda/default.nix
+@@ -1,7 +1,6 @@
+ {
+ buildPythonPackage,
+ horizon-eda,
+- mesa,
+ pycairo,
+ python,
+ pythonOlder,
+@@ -24,8 +23,6 @@ buildPythonPackage {
+ disabled = pythonOlder "3.9";
+
+ buildInputs = base.buildInputs ++ [
+- mesa
+- mesa.osmesa
+ python
+ ];
+
+diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
+index 2dc81662f4257..754055f229ba5 100644
+--- a/pkgs/servers/x11/xorg/overrides.nix
++++ b/pkgs/servers/x11/xorg/overrides.nix
+@@ -604,7 +604,6 @@ self: super:
+ });
+
+ xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: {
+- buildInputs = attrs.buildInputs ++ [ mesa mesa.driversdev llvm ]; # for libxatracker
+ env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address" ]; # gcc12
+ meta = attrs.meta // {
+ platforms = ["i686-linux" "x86_64-linux"];
+diff --git a/pkgs/tools/X11/primus/lib.nix b/pkgs/tools/X11/primus/lib.nix
+index 7e6572f66a9a5..1beecf73015ec 100644
+--- a/pkgs/tools/X11/primus/lib.nix
++++ b/pkgs/tools/X11/primus/lib.nix
+@@ -5,7 +5,6 @@
+ fetchpatch,
+ libX11,
+ libGL,
+- mesa,
+ nvidia_x11 ? null,
+ libglvnd,
+ }:
+@@ -48,7 +47,6 @@ stdenv.mkDerivation {
+ "LIBDIR=$(out)/lib"
+ "PRIMUS_libGLa=${aPackage}/lib/libGL.so"
+ "PRIMUS_libGLd=${libGL}/lib/libGL.so"
+- "PRIMUS_LOAD_GLOBAL=${mesa}/lib/libglapi.so"
+ ];
+
+ installPhase = ''
+diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
+index 3feea755f81b5..ae79b42a313c5 100644
+--- a/pkgs/top-level/all-packages.nix
++++ b/pkgs/top-level/all-packages.nix
+@@ -9905,6 +9905,7 @@ with pkgs;
+ mesa_i686 = pkgsi686Linux.mesa; # make it build on Hydra
+
+ libgbm = callPackage ../development/libraries/mesa/gbm.nix {};
++ mesa-gl-headers = callPackage ../development/libraries/mesa/headers.nix {};
+
+ ## End libGL/libGLU/Mesa stuff
+
+diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
+index d781f386f10ba..6a9fc437c31b6 100644
+--- a/pkgs/top-level/python-packages.nix
++++ b/pkgs/top-level/python-packages.nix
+@@ -6099,7 +6099,7 @@ self: super: with self; {
+ hopcroftkarp = callPackage ../development/python-modules/hopcroftkarp { };
+
+ horizon-eda = callPackage ../development/python-modules/horizon-eda {
+- inherit (pkgs) horizon-eda mesa;
++ inherit (pkgs) horizon-eda;
+ };
+
+ howdoi = callPackage ../development/python-modules/howdoi { };
diff --git a/files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff b/files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff
new file mode 100644
index 0000000..550506d
--- /dev/null
+++ b/files/nixpkgs-patches/d3631853bd708955edfe71dca94171efb5749711.diff
@@ -0,0 +1,80 @@
+diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix
+index 96b996e4f38c6..89e03d1d69977 100644
+--- a/pkgs/by-name/or/orca-slicer/package.nix
++++ b/pkgs/by-name/or/orca-slicer/package.nix
+@@ -27,7 +27,6 @@
+ hicolor-icon-theme,
+ ilmbase,
+ libpng,
+- mesa,
+ mpfr,
+ nlopt,
+ opencascade-occt_7_6,
+@@ -107,9 +106,6 @@ stdenv.mkDerivation rec {
+ hicolor-icon-theme
+ ilmbase
+ libpng
+- mesa
+- mesa.osmesa
+- mesa.drivers
+ mpfr
+ nlopt
+ opencascade-occt_7_6
+@@ -129,6 +125,8 @@ stdenv.mkDerivation rec {
+ ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
+ # Link opencv_core and opencv_imgproc instead of opencv_world
+ ./patches/dont-link-opencv-world-orca.patch
++ # Don't link osmesa
++ ./patches/no-osmesa.patch
+ # The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged
+ # Allows disabling the update nag screen
+ (fetchpatch {
+@@ -169,8 +167,6 @@ stdenv.mkDerivation rec {
+
+ NIX_LDFLAGS = toString [
+ (lib.optionalString withSystemd "-ludev")
+- "-L${mesa.osmesa}/lib"
+- "-L${mesa.drivers}/lib"
+ "-L${boost186}/lib"
+ "-lboost_log"
+ "-lboost_log_setup"
+@@ -194,7 +190,6 @@ stdenv.mkDerivation rec {
+ "-DBOOST_LOG_NO_LIB=OFF"
+ "-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION"
+ "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed"
+- "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib"
+ "-DORCA_VERSION_CHECK_DEFAULT=OFF"
+ ];
+
+@@ -202,12 +197,9 @@ stdenv.mkDerivation rec {
+ gappsWrapperArgs+=(
+ --prefix LD_LIBRARY_PATH : "$out/lib:${
+ lib.makeLibraryPath [
+- mesa.drivers
+- mesa.osmesa
+ glew
+ ]
+ }"
+- --prefix LIBGL_DRIVERS_PATH : "${mesa.drivers}/lib/dri"
+ --set WEBKIT_DISABLE_COMPOSITING_MODE 1
+ )
+ '';
+diff --git a/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch
+new file mode 100644
+index 0000000000000..09298b3e55b6d
+--- /dev/null
++++ b/pkgs/by-name/or/orca-slicer/patches/no-osmesa.patch
+@@ -0,0 +1,13 @@
++diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
++index e695acd48..174e233e6 100644
++--- a/src/slic3r/CMakeLists.txt
+++++ b/src/slic3r/CMakeLists.txt
++@@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
++ FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl)
++ FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client)
++ find_package(CURL REQUIRED)
++- target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa)
+++ target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
++ target_link_libraries(libslic3r_gui
++ OpenGL::EGL
++ ${WAYLAND_SERVER_LIBRARIES}