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
This commit is contained in:
Abdullah Imad
2026-05-28 15:09:44 -04:00
parent 580d7a1e04
commit 29c6bc3a70
+13 -4
View File
@@ -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 = {