3 ms·
It's possible to build FHS environments with multilib [1]. In fact it's what I use to run games and other binary only software: It works perfectly for me. I wil
by rnhmjoj 10y ago
It's possible to build FHS environments with multilib [1]. In fact it's what I use to run games and other binary only software: It works perfectly for me. I will share my setup.
The expression `games.nix` [2] I use for my games builds a chroot environment with both 32bit and 64bit /lib and a command `start-game` to launch games from the environment.
I store them in ~/game/$gamename, with a `$gamename/start.sh`, which is a slightly tweaked or cleaned up version of what it's usually found in gogs and humble bundle games.
To use it you do `nix-env -if games.nix` to install it the first time and the just `start-game $gamename` to play.
To fiddle around uncomment the trailing `#.env`, run `nix-shell games.nix` and you will land in the chroot environment with everything you need.
Most of Nix features like this one are not really documented but fortunately there's github search and folks in #nixos are always available.
[1]: https://nixos.org/wiki/FHS_environments https://nixos.org/wiki/FHS_environments
[2]: https://hastebin.com/fopelaseyo.nix https://hastebin.com/fopelaseyo.nix