From 29c6bc3a70efb53ff9492be949162219bed98e9d Mon Sep 17 00:00:00 2001 From: Abdullah Imad Date: Thu, 28 May 2026 15:09:44 -0400 Subject: [PATCH] plasticity: 25.3.9 -> 26.1.3 Upstream changed how it ships GPU bits; the prior --use-gl=egl wrapper flag is no longer enough. Replace it with a patchelf-time fix: - --add-needed libGL.so.1 with a libGL rpath on the Plasticity binary - replace the bundled libvulkan.so.1 with a symlink to the nixpkgs vulkan-loader This resolves the GPU init failures reported on 25.3.9 ("Passthrough is not supported, GL is egl, ANGLE is" and glXQueryExtensionsString returning NULL with Mesa 26). Fixes: https://github.com/NixOS/nixpkgs/issues/487729 --- pkgs/by-name/pl/plasticity/package.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pl/plasticity/package.nix b/pkgs/by-name/pl/plasticity/package.nix index 75d04eac28d9..ef9427a037f2 100644 --- a/pkgs/by-name/pl/plasticity/package.nix +++ b/pkgs/by-name/pl/plasticity/package.nix @@ -18,6 +18,7 @@ libnotify, libxkbcommon, libgbm, + libGL, nspr, nss, openssl, @@ -40,11 +41,11 @@ }: stdenv.mkDerivation rec { pname = "plasticity"; - version = "25.3.9"; + version = "26.1.3"; src = fetchurl { url = "https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm"; - hash = "sha256-92DokpVmywh7EZZMKAoXf0RzkEuG/4Ngd5l0l/o6Klk="; + hash = "sha256-gHoih3CldhrHPLBpu3slRUxJSBIbYYhQ9WhEbhjHzyM="; }; passthru.updateScript = ./update.sh; @@ -122,9 +123,17 @@ stdenv.mkDerivation rec { runHook postInstall ''; - #--use-gl=egl for it to use hardware rendering it seems. Otherwise there are terrible framerates preFixup = '' - gappsWrapperArgs+=(--add-flags "--use-gl=egl") + patchelf --add-needed libGL.so.1 \ + --set-rpath "${ + lib.makeLibraryPath [ + libGL + ] + }" \ + $out/bin/Plasticity + + rm "$out/lib/Plasticity/libvulkan.so.1" + ln -s -t "$out/lib/Plasticity" "${lib.getLib vulkan-loader}/lib/libvulkan.so.1" ''; meta = {