nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildFHSEnv,
4 lutris-unwrapped,
5 extraPkgs ? pkgs: [ ],
6 extraLibraries ? pkgs: [ ],
7 steamSupport ? true,
8}:
9
10let
11
12 qt5Deps =
13 pkgs: with pkgs.qt5; [
14 qtbase
15 qtmultimedia
16 ];
17 qt6Deps = pkgs: with pkgs.qt6; [ qtbase ];
18 gnomeDeps =
19 pkgs: with pkgs; [
20 zenity
21 gtksourceview
22 gnome-desktop
23 libgnome-keyring
24 webkitgtk_4_1
25 ];
26 xorgDeps =
27 pkgs: with pkgs.xorg; [
28 libX11
29 libXrender
30 libXrandr
31 libxcb
32 libXmu
33 libpthreadstubs
34 libXext
35 libXdmcp
36 libXxf86vm
37 libXinerama
38 libSM
39 libXv
40 libXaw
41 libXi
42 libXcursor
43 libXcomposite
44 libXfixes
45 libXtst
46 libXScrnSaver
47 libICE
48 libXt
49 ];
50 gstreamerDeps =
51 pkgs: with pkgs.gst_all_1; [
52 gstreamer
53 gst-plugins-base
54 gst-plugins-good
55 gst-plugins-ugly
56 gst-plugins-bad
57 gst-libav
58 ];
59
60in
61buildFHSEnv {
62 pname = "lutris";
63 inherit (lutris-unwrapped) version;
64
65 runScript = "lutris";
66
67 # Many native and WINE games need 32bit
68 multiArch = true;
69
70 targetPkgs =
71 pkgs:
72 with pkgs;
73 [
74 lutris-unwrapped
75
76 # Appimages
77 fuse
78
79 # Adventure Game Studio
80 allegro
81 dumb
82
83 # Battle.net
84 jansson
85
86 # Curl
87 libnghttp2
88
89 # Desmume
90 lua
91 agg
92 soundtouch
93 openal
94 desktop-file-utils
95 atk
96
97 # DGen // TODO: libarchive is broken
98
99 # Dolphin
100 bluez
101 ffmpeg_6
102 gettext
103 portaudio
104 miniupnpc
105 mbedtls_2
106 lzo
107 sfml
108 gsm
109 wavpack
110 orc
111 nettle
112 gmp
113 pcre
114 vulkan-loader
115 zstd
116
117 # DOSBox
118 SDL_net
119 SDL_sound
120
121 # GOG
122 glib-networking
123
124 # Higan // TODO: "higan is not available for the x86_64 architecture"
125
126 # Libretro
127 fluidsynth
128 hidapi
129 libgbm
130 libdrm
131
132 # MAME
133 fontconfig
134 SDL2_ttf
135
136 # Mednafen
137 libglut
138 mesa_glu
139
140 # MESS
141 expat
142
143 # Minecraft
144 nss
145
146 # Mupen64Plus
147 boost
148 dash
149
150 # Overwatch 2
151 libunwind
152
153 # PPSSPP
154 glew
155 snappy
156
157 # Redream // "redream is not available for the x86_64 architecture"
158
159 # RPCS3
160 llvm
161 e2fsprogs
162 libgpg-error
163
164 # ScummVM
165 nasm
166 sndio
167
168 # ResidualVM is now merged with ScummVM and therefore does not exist anymore
169 flac
170
171 # Snes9x
172 libepoxy
173 minizip
174
175 # Vice
176 bison
177 flex
178
179 # WINE
180 xorg.xrandr
181 perl
182 which
183 p7zip
184 gnused
185 gnugrep
186 psmisc
187 opencl-headers
188
189 # ZDOOM
190 soundfont-fluid
191 bzip2
192 game-music-emu
193 ]
194 ++ qt5Deps pkgs
195 ++ qt6Deps pkgs
196 ++ gnomeDeps pkgs
197 ++ lib.optional steamSupport pkgs.steam
198 ++ extraPkgs pkgs;
199
200 multiPkgs =
201 pkgs:
202 with pkgs;
203 [
204 # Common
205 libsndfile
206 libtheora
207 libogg
208 libvorbis
209 libopus
210 libGLU
211 libpcap
212 libpulseaudio
213 libao
214 libevdev
215 udev
216 libgcrypt
217 libxml2
218 libusb1
219 libpng
220 libmpeg2
221 libv4l
222 libjpeg
223 libxkbcommon
224 libass
225 libcdio
226 libjack2
227 libsamplerate
228 libzip
229 libmad
230 libaio
231 libcap
232 libtiff
233 libva
234 libgphoto2
235 libxslt
236 libsndfile
237 giflib
238 zlib
239 glib
240 alsa-lib
241 zziplib
242 bash
243 dbus
244 keyutils
245 zip
246 cabextract
247 freetype
248 unzip
249 coreutils
250 readline
251 gcc
252 SDL
253 SDL2
254 curl
255 graphite2
256 gtk2
257 gtk3
258 udev
259 ncurses
260 wayland
261 libglvnd
262 vulkan-loader
263 xdg-utils
264 sqlite
265 gnutls
266 p11-kit
267 libbsd
268 harfbuzz
269
270 # PCSX2 // TODO: "libgobject-2.0.so.0: wrong ELF class: ELFCLASS64"
271
272 # WINE
273 cups
274 lcms2
275 mpg123
276 cairo
277 unixODBC
278 samba4
279 sane-backends
280 openldap
281 ocl-icd
282 util-linux
283 libkrb5
284
285 # Proton
286 libselinux
287
288 # Winetricks
289 fribidi
290 pango
291 ]
292 ++ xorgDeps pkgs
293 ++ gstreamerDeps pkgs
294 ++ extraLibraries pkgs;
295
296 extraInstallCommands = ''
297 mkdir -p $out/share
298 ln -sf ${lutris-unwrapped}/share/applications $out/share
299 ln -sf ${lutris-unwrapped}/share/icons $out/share
300 '';
301
302 # allows for some gui applications to share IPC
303 # this fixes certain issues where they don't render correctly
304 unshareIpc = false;
305
306 # Some applications such as Natron need access to MIT-SHM or other
307 # shared memory mechanisms. Unsharing the pid namespace
308 # breaks the ability for application to reference shared memory.
309 unsharePid = false;
310
311 meta = {
312 inherit (lutris-unwrapped.meta)
313 homepage
314 description
315 platforms
316 license
317 maintainers
318 broken
319 ;
320
321 mainProgram = "lutris";
322 };
323}