Turns out you were right, after re-reading the arch thread the patch is to move the lib from $build/tls/libnvidia-tls.so
to $out/lib/libnvidia-tls.so
, which is what you do. This is what I ended up with:
package = config.boot.kernelPackages.nvidiaPackages.legacy_390.overrideAttrs (old: {
postFixup = ''
mv $out/lib/tls/* $out/lib
rmdir $out/lib/tls
'';
});
Now I just have to go and patch nvidia-x11 on NixOS. Thanks again for your help !