I am trying to run SMAPI, which is a modding tool for stardew valley. Whenever I run it, keep giving me the error install on Linux.sh: line 4: internal/linux/SMAPI.Installer: cannot execute: required file not found.
For instance, running this in the ubuntu vm works fine.
Edit: with ldd I found the issue. but have no idea how to solve it
Running generic linux executables generally does not work on nixos. This is because the ELF interpreter (ld-linux.so) is not in the standard location in /lib (there isn’t even a /lib on nixos!), because script interpreters aren’t found at their usual locations aside from /bin/sh and /usr/bin/env, and because there is no global library path on nixos at all.
The possible solutions include, in rough order of preference:
Package whatever program it is from source, if possible
Package whatever program it is with autoPatchelfHook
Package whatever program it is with buildFHSUserEnv
My kids and I have logged too many hours on Stardew Valley. Recently we decided it was time to download some mods. I downloaded SMAPI, extracted it, then just used steam-run to execute the installer and everything worked flawlessly.
steam-run should be in your path if you have enabled the steam module in your configuration.nix
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};