[Nix-dev] packaging windows applications through wine

Alexander V. Nikolaev avn at avnik.info
Wed Apr 26 15:17:27 CEST 2017


On Tue, Apr 25, 2017 at 02:01:11AM +0200, aszlig wrote:

> I guess the simplest method would be the latter, because if you extract
> the installer archive there might be some missing files or registry keys
> that you need to apply as well.
> 
> Here is an example for automating this via xdotool:
> 
> https://github.com/openlab-aux/vuizvui/blob/97e440e996e9c418e46af3dbcdba58595b5c11ea/pkgs/aszlig/santander/default.nix#L63-L74
> 

Looks interesting. Thank you for link.

> > The other challenge I see is where do you put the wineprefix? Because
> > on the one hand you want the installation to happen at system build
> > time, so that would suggest the nix store. But you also want the
> > application to be able to write files (like saves &c) so that would
> > have to be in your home folder.
> 
> You could set the user data directory to some other unix path via
> dosdevices/ and change %APPDATA% accordingly, like:
> 
> https://support.microsoft.com/en-us/help/190234/prb-how-to-modify-the-personal-directory-for-all-new-users
> 
> Another way would be to use a wrapper that uses overlayfs to write all
> the differences of the immutable store path to some location within the
> home directory (like eg. ${XDG_DATA_HOME:-$HOME/.local/share}/your_app).
> 

Combination of bindfs+unionfs works well.
(bindfs for mangle permissions from 0444 to 0644, otherwise unionfs show
files from store as read-only. I picked unionfs as more bullet-proof,
don't know how kernel' overlayfs behave here)


More information about the nix-dev mailing list