about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/development/libraries/mesa
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mesa')
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch59
2 files changed, 12 insertions, 66 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix
index cb9d19c30c84..38b73f56cab6 100644
--- a/nixpkgs/pkgs/development/libraries/mesa/default.nix
+++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix
@@ -60,6 +60,7 @@
 , vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ "device-select" "overlay" "intel-nullhw" ] # No Vulkan support on Darwin
 , OpenGL, Xplugin
 , withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light && !valgrind-light.meta.broken, valgrind-light
+, withLibunwind ? lib.meta.availableOn stdenv.hostPlatform libunwind
 , enableGalliumNine ? stdenv.isLinux
 , enableOSMesa ? stdenv.isLinux
 , enableOpenCL ? stdenv.isLinux && stdenv.isx86_64
@@ -85,8 +86,8 @@
 */
 
 let
-  version = "23.3.3";
-  hash = "sha256-UYMHwAV/o87otY33i+Qx1N9ar6ftxg0JJ4stegqA87Q=";
+  version = "23.3.5";
+  hash = "sha256-acyxJ4ZB/1utccoPhmGIrrGpKq3E27nTX1CuvsW4tQ8=";
 
   # Release calendar: https://www.mesa3d.org/release-calendar.html
   # Release frequency: https://www.mesa3d.org/releasing.html#schedule
@@ -120,7 +121,6 @@ self = stdenv.mkDerivation {
     ./musl.patch
 
     ./opencl.patch
-    ./disk_cache-include-dri-driver-path-in-cache-key.patch
 
     # Backports to fix build
     # FIXME: remove when applied upstream
@@ -169,7 +169,6 @@ self = stdenv.mkDerivation {
     # https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327
     "-Db_ndebug=true"
 
-    "-Ddisk-cache-key=${placeholder "drivers"}"
     "-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
 
     "-Dplatforms=${lib.concatStringsSep "," eglPlatforms}"
@@ -217,6 +216,8 @@ self = stdenv.mkDerivation {
     "-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib"
   ]  ++ lib.optionals (!withValgrind) [
     "-Dvalgrind=disabled"
+  ]  ++ lib.optionals (!withLibunwind) [
+    "-Dlibunwind=disabled"
   ] ++ lib.optional enablePatentEncumberedCodecs
     "-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"
   ++ lib.optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}";
@@ -226,7 +227,10 @@ self = stdenv.mkDerivation {
     libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr
     libffi libvdpau libelf libXvMC
     libpthreadstubs openssl /*or another sha1 provider*/
-    zstd libunwind
+    zstd
+  ] ++ lib.optionals withLibunwind [
+    libunwind
+  ] ++ [
     python3Packages.python # for shebang
   ] ++ lib.optionals haveWayland [ wayland wayland-protocols ]
     ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ]
@@ -310,8 +314,9 @@ self = stdenv.mkDerivation {
 
   postFixup = lib.optionalString stdenv.isLinux ''
     # set the default search path for DRI drivers; used e.g. by X server
-    substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
-    [ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}"
+    for pc in lib/pkgconfig/{dri,d3d}.pc; do
+      [ -f "$dev/$pc" ] && substituteInPlace "$dev/$pc" --replace "$drivers" "${libglvnd.driverLink}"
+    done
 
     # remove pkgconfig files for GL/EGL; they are provided by libGL.
     rm -f $dev/lib/pkgconfig/{gl,egl}.pc
diff --git a/nixpkgs/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch b/nixpkgs/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
deleted file mode 100644
index 05f5ec7b6a03..000000000000
--- a/nixpkgs/pkgs/development/libraries/mesa/disk_cache-include-dri-driver-path-in-cache-key.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/meson_options.txt b/meson_options.txt
-index 591ed957c85..6cb550593e3 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -519,6 +519,13 @@ option(
-   description : 'Enable direct rendering in GLX and EGL for DRI',
- )
- 
-+option(
-+  'disk-cache-key',
-+  type : 'string',
-+  value : '',
-+  description : 'Mesa cache key.'
-+)
-+
- option('egl-lib-suffix',
-   type : 'string',
-   value : '',
-diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
-index 1d23b92af7e..fbb4b04f3cf 100644
---- a/src/util/disk_cache.c
-+++ b/src/util/disk_cache.c
-@@ -218,8 +218,10 @@ disk_cache_type_create(const char *gpu_name,
- 
-    /* Create driver id keys */
-    size_t id_size = strlen(driver_id) + 1;
-+   size_t key_size = strlen(DISK_CACHE_KEY) + 1;
-    size_t gpu_name_size = strlen(gpu_name) + 1;
-    cache->driver_keys_blob_size += id_size;
-+   cache->driver_keys_blob_size += key_size;
-    cache->driver_keys_blob_size += gpu_name_size;
- 
-    /* We sometimes store entire structs that contains a pointers in the cache,
-@@ -240,6 +242,7 @@ disk_cache_type_create(const char *gpu_name,
-    uint8_t *drv_key_blob = cache->driver_keys_blob;
-    DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size)
-    DRV_KEY_CPY(drv_key_blob, driver_id, id_size)
-+   DRV_KEY_CPY(drv_key_blob, DISK_CACHE_KEY, key_size)
-    DRV_KEY_CPY(drv_key_blob, gpu_name, gpu_name_size)
-    DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size)
-    DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size)
-diff --git a/src/util/meson.build b/src/util/meson.build
-index eb88f235c47..eae5c54cc10 100644
---- a/src/util/meson.build
-+++ b/src/util/meson.build
-@@ -286,7 +286,12 @@ _libmesa_util = static_library(
-   include_directories : [inc_util, include_directories('format')],
-   dependencies : deps_for_libmesa_util,
-   link_with: [libmesa_util_sse41],
--  c_args : [c_msvc_compat_args],
-+  c_args : [
-+    c_msvc_compat_args,
-+    '-DDISK_CACHE_KEY="@0@"'.format(
-+      get_option('disk-cache-key')
-+    ),
-+  ],
-   gnu_symbol_visibility : 'hidden',
-   build_by_default : false
- )