Libc static library issues when running Ryujinx on non nixos

I am a pretty new user of nixpkgs and I using it on the steam deck (immutable arch-based distro with KDE) with home-manager.

I am trying to run Ryujinx after installing via home-manager (and wrapping pkg with nixGL). However, when I attempt to open a directory from the application I get the following relevant error and no file-chooser opens:

00:00:17.136 |E| .NET TP Worker kde-open5: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/stor
e/3lc70x3rsx2dmbwwrpk877kaa4b7d333-systemd-minimal-libs-256.2/lib/libudev.so.1)
00:00:17.136 |E| .NET TP Worker kde-open5: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/stor
e/3lc70x3rsx2dmbwwrpk877kaa4b7d333-systemd-minimal-libs-256.2/lib/libsystemd.so.0)
00:00:17.136 |E| .NET TP Worker kde-open5: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/stor
e/94sinl3kmf4byyjgfpy4mmm9crwj8imc-libX11-1.8.9/lib/libX11.so.6)

I am not sure why the libc libraries are being mixed and matched for 2 different programs. As I understand my system installed kde (not from nix) seems to expect a glibc 2_38. I am not sure how to proceed to get this working. Should I be trying to build Ryujinx with my system libraries?

env | grep -i LD shows nothing relevant. ldd --version shows
ldd (GNU libc) 2.37

Long shot, here. I wonder whether you might be able to gain some insight from going through the environment variables and seeing whether any of them seem like they might be related.

Thanks. I think I have a better idea about what is happening now. It seems like NIXGL works by setting the LD_PRELOAD env variable. My alacritty terminal, wrapped with nixGL, includes this extra environment variable:

LD_LIBRARY_PATH=/nix/store/2l4j4zp09047g61c0hw5ndw8k7lakd0c-mesa-22.1.4-drivers/lib:/nix/store/pns85bw3vgcdjpcr9in30sysnnyki869-mesa-22.1.4-drivers/lib:/nix/store/c7xa9p3q2p133v2msk5x3ynwfxr5p98x-libvdpau-va-gl-0.4.2/lib/vdpau:/nix/store/fn6brdggg4pzhkgqbcpwd3q4w7hk08m3-libvdpau-va-gl-0.4.2/lib/vdpau:/nix/store/zsy0dlizfnv39w5rw4i2ljs6c5qh7ph1-mesa_glxindirect/lib:/nix/store/l677ivx0lpf5wbqr9dk3dk8rxnfqnqyx-libglvnd-1.4.0/lib

Don’t really know whats happening there but I’ll read more about the NixGL program. This isn’t there when using my normal terminal.