2015-07-28 11:42:11 +01:00
|
|
|
{ lib, buildFHSUserEnv
|
|
|
|
, withRuntime ? false
|
|
|
|
, withJava ? false
|
|
|
|
, withPrimus ? false
|
|
|
|
}:
|
2013-09-13 22:58:59 +01:00
|
|
|
|
2015-02-05 15:16:02 +00:00
|
|
|
buildFHSUserEnv {
|
2013-09-13 22:58:59 +01:00
|
|
|
name = "steam";
|
2014-04-23 00:03:14 +01:00
|
|
|
|
|
|
|
targetPkgs = pkgs:
|
2015-02-06 00:48:32 +00:00
|
|
|
[ pkgs.steam-original
|
2015-06-12 00:01:23 +01:00
|
|
|
# Errors in output without those
|
|
|
|
pkgs.pciutils
|
|
|
|
pkgs.python2
|
|
|
|
# Games' dependencies
|
|
|
|
pkgs.xlibs.xrandr
|
2015-07-12 22:05:18 +01:00
|
|
|
pkgs.which
|
2014-06-15 14:34:27 +01:00
|
|
|
]
|
2015-07-28 11:42:11 +01:00
|
|
|
++ lib.optional withJava pkgs.jdk
|
|
|
|
++ lib.optional withPrimus pkgs.primus
|
2014-06-15 14:34:27 +01:00
|
|
|
;
|
2014-04-23 00:03:14 +01:00
|
|
|
|
2015-07-28 11:42:11 +01:00
|
|
|
multiPkgs = pkgs: [
|
|
|
|
# These are required by steam with proper errors
|
2015-06-12 00:01:23 +01:00
|
|
|
pkgs.xlibs.libXcomposite
|
|
|
|
pkgs.xlibs.libXtst
|
|
|
|
pkgs.xlibs.libXrandr
|
|
|
|
pkgs.xlibs.libXext
|
|
|
|
pkgs.xlibs.libX11
|
|
|
|
pkgs.xlibs.libXfixes
|
|
|
|
|
2014-07-10 09:25:19 +01:00
|
|
|
pkgs.glib
|
2015-06-12 00:01:23 +01:00
|
|
|
pkgs.gtk2
|
|
|
|
pkgs.bzip2
|
|
|
|
pkgs.zlib
|
|
|
|
pkgs.libpulseaudio
|
2014-07-10 09:25:19 +01:00
|
|
|
pkgs.gdk_pixbuf
|
2014-04-23 00:03:14 +01:00
|
|
|
|
2015-07-28 11:42:11 +01:00
|
|
|
# Not formally in runtime but needed by some games
|
|
|
|
pkgs.gst_all_1.gstreamer
|
|
|
|
pkgs.gst_all_1.gst-plugins-ugly
|
|
|
|
] ++ lib.optionals withRuntime [
|
2015-06-12 00:01:23 +01:00
|
|
|
# Without these it silently fails
|
|
|
|
pkgs.xlibs.libXinerama
|
|
|
|
pkgs.xlibs.libXdamage
|
|
|
|
pkgs.xlibs.libXcursor
|
|
|
|
pkgs.xlibs.libXrender
|
|
|
|
pkgs.xlibs.libXScrnSaver
|
|
|
|
pkgs.xlibs.libXi
|
|
|
|
pkgs.xlibs.libSM
|
|
|
|
pkgs.xlibs.libICE
|
|
|
|
pkgs.gnome2.GConf
|
2014-07-10 09:25:19 +01:00
|
|
|
pkgs.freetype
|
2015-06-12 00:01:23 +01:00
|
|
|
pkgs.openalSoft
|
|
|
|
pkgs.curl
|
|
|
|
pkgs.nspr
|
|
|
|
pkgs.nss
|
|
|
|
pkgs.fontconfig
|
|
|
|
pkgs.cairo
|
|
|
|
pkgs.pango
|
|
|
|
pkgs.alsaLib
|
|
|
|
pkgs.expat
|
|
|
|
pkgs.dbus
|
|
|
|
pkgs.cups
|
|
|
|
pkgs.libcap
|
2014-07-10 09:25:19 +01:00
|
|
|
pkgs.SDL2
|
2015-06-12 00:01:23 +01:00
|
|
|
pkgs.libusb1
|
|
|
|
pkgs.dbus_glib
|
|
|
|
pkgs.libav
|
|
|
|
pkgs.atk
|
|
|
|
# Only libraries are needed from those two
|
|
|
|
pkgs.udev182
|
|
|
|
pkgs.networkmanager098
|
2014-04-23 00:03:14 +01:00
|
|
|
|
2015-06-12 00:01:23 +01:00
|
|
|
# Verified games requirements
|
|
|
|
pkgs.xlibs.libXmu
|
|
|
|
pkgs.xlibs.libxcb
|
|
|
|
pkgs.xlibs.libpciaccess
|
|
|
|
pkgs.mesa_glu
|
|
|
|
pkgs.libuuid
|
|
|
|
pkgs.libogg
|
2014-07-10 09:25:19 +01:00
|
|
|
pkgs.libvorbis
|
2015-06-12 00:01:23 +01:00
|
|
|
pkgs.SDL
|
|
|
|
pkgs.SDL2_image
|
|
|
|
pkgs.glew110
|
|
|
|
pkgs.openssl
|
|
|
|
pkgs.libidn
|
2014-04-23 00:03:14 +01:00
|
|
|
|
2015-06-12 00:01:23 +01:00
|
|
|
# Other things from runtime
|
|
|
|
pkgs.xlibs.libXinerama
|
|
|
|
pkgs.flac
|
|
|
|
pkgs.freeglut
|
|
|
|
pkgs.libjpeg
|
|
|
|
pkgs.libpng12
|
|
|
|
pkgs.libsamplerate
|
|
|
|
pkgs.libmikmod
|
|
|
|
pkgs.libtheora
|
|
|
|
pkgs.pixman
|
|
|
|
pkgs.speex
|
|
|
|
pkgs.SDL_image
|
|
|
|
pkgs.SDL_ttf
|
|
|
|
pkgs.SDL_mixer
|
|
|
|
pkgs.SDL2_net
|
|
|
|
pkgs.SDL2_ttf
|
|
|
|
pkgs.SDL2_mixer
|
|
|
|
pkgs.gstreamer
|
|
|
|
pkgs.gst_plugins_base
|
2014-07-10 09:25:19 +01:00
|
|
|
];
|
2014-04-23 00:03:14 +01:00
|
|
|
|
|
|
|
extraBuildCommandsMulti = ''
|
|
|
|
cd usr/lib
|
|
|
|
ln -sf ../lib64/steam steam
|
2015-06-12 00:01:23 +01:00
|
|
|
|
|
|
|
# FIXME: maybe we should replace this with proper libcurl-gnutls
|
|
|
|
ln -s libcurl.so.4 libcurl-gnutls.so.4
|
2014-04-23 00:03:14 +01:00
|
|
|
'';
|
|
|
|
|
2015-07-28 11:42:11 +01:00
|
|
|
profile = if withRuntime then ''
|
|
|
|
export STEAM_RUNTIME=0
|
|
|
|
'' else ''
|
|
|
|
# Ugly workaround for https://github.com/ValveSoftware/steam-for-linux/issues/3504
|
|
|
|
export LD_PRELOAD=/lib32/libpulse.so:/lib64/libpulse.so:/lib32/libasound.so:/lib64/libasound.so:$LD_PRELOAD
|
|
|
|
# Another one for https://github.com/ValveSoftware/steam-for-linux/issues/3801
|
|
|
|
export LD_PRELOAD=/lib32/libstdc++.so:/lib64/libstdc++.so:$LD_PRELOAD
|
2013-09-13 22:58:59 +01:00
|
|
|
'';
|
2015-02-05 15:16:02 +00:00
|
|
|
|
2015-04-22 14:52:57 +01:00
|
|
|
runScript = "steam";
|
2013-09-13 22:58:59 +01:00
|
|
|
}
|