How to manually run wine not installed via Nix?

There are some occasion where I need to manually run wine installed by other means, like Steam or Bottles on NixOS. How would I go about doing so?

Or, slightly different but related question, how are they doing it? How do Steam or Bottles run wine without modifying wine itself in NixOS? What wrapping was done?

I don’t know about bottles, but steam runs in a bwrap environment that links libraries into FHS-compliant paths.

I don’t know about wine specifically, but steam-run or appimage-run might suffice to run non-nix-packaged programs directly.

It’s not as straightforward as the previous’ post answer but I just stumbled into that recently and wrote a post about it you might get some ideas from Using buildFHSEnv for dynamically linked libraries with esphome as example

Thanks a lot. Now that you’ve mentioned it. I tried steam-run ~/.local/share/bottles/runners/soda-someversion/bin/wine path/to/exe and that actually work for some programs but that doesn’t seems to be the full story. Suppose that I have a game that I installed from steam. It doesn’t works with proton with the same method. I think there’s something else missing. If I try bottles, it also doesn’t works (with bottle’s generated standalone file that includes additional env variables). Note that the same game works if I run with the bottles GUI.