diff --git a/Dist/wrapper-scripts.nix b/Dist/wrapper-scripts.nix index 4353fb0c36..1dace5bd11 100644 --- a/Dist/wrapper-scripts.nix +++ b/Dist/wrapper-scripts.nix @@ -14,6 +14,15 @@ , initConfig # pretend this is JSON; the following env. vars will be substituted by the wrapper script (if surrounded by double-percent e.g. `%%BIZHAWK_DATA_HOME%%`): `BIZHAWK_DATA_HOME` }: let + glHackLibs = rec { + Manjaro_21_0_3 = [ # should match Arch and Manjaro releases from '20/'21 + "libdrm_amdgpu.so.1" "libdrm_nouveau.so.2" "libdrm_radeon.so.1" "libedit.so.0" "libelf.so.1" "libffi.so.7" "libGLdispatch.so.0" "libicudata.so.69" "libicuuc.so.69" "libLLVM-11.so" "liblzma.so.5" "libncursesw.so.6" "libsensors.so.5" "libstdc++.so.6" "libvulkan.so.1" "libxml2.so.2" "libz.so.1" "libzstd.so.1" + ]; + LinuxMint_20_2 = [ # should match Ubuntu 20.04 and similar distros + "libbsd.so.0" "libedit.so.2" "libLLVM-12.so.1" "libtinfo.so.6" + ] ++ Manjaro_21_0_3; #TODO split + }; + glHackLibsFlat = lib.unique (lib.flatten (builtins.attrValues glHackLibs)); initConfigFile = writeText "config.json" (builtins.toJSON ({ LastWrittenFrom = if builtins.length (builtins.splitVersion hawkVersion) < 3 then "${hawkVersion}.0" else hawkVersion; PathEntries = { @@ -69,7 +78,7 @@ in rec { ln -fsvT "${lib.getOutput "drivers" mesa}/lib/libGLX_mesa.so.0" "$BIZHAWK_GLHACKDIR/libGLX_indirect.so.0" fi # collect links to certain GL libs (and their deps) from host, added to LD_LIBRARY_PATH without polluting it with all libs from host - for l in libbsd.so.0 libdrm_amdgpu.so.1 libdrm_nouveau.so.2 libdrm_radeon.so.1 libedit.so.0 libedit.so.2 libelf.so.1 libffi.so.7 libGLdispatch.so.0 libicudata.so.69 libicuuc.so.69 libLLVM-11.so libLLVM-12.so.1 liblzma.so.5 libncursesw.so.6 libsensors.so.5 libstdc++.so.6 libtinfo.so.6 libvulkan.so.1 libxml2.so.2 libz.so.1 libzstd.so.1; do + for l in ${builtins.concatStringsSep " " glHackLibsFlat}; do if [ -e "$BIZHAWK_GLHACKDIR/$l" ]; then continue; fi # else it's either a broken link or it doesn't exist, we use ln -f to cover both for d in /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib64 /lib /lib64; do