2016-01-15 11:54:01 +00:00
|
|
|
{ stdenv, lib, perl, pkgs, steam-runtime
|
2015-08-23 16:17:15 +01:00
|
|
|
, nativeOnly ? false
|
|
|
|
, runtimeOnly ? false
|
2016-01-15 11:54:01 +00:00
|
|
|
, newStdcpp ? false
|
2015-08-23 16:17:15 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert !(nativeOnly && runtimeOnly);
|
2016-01-15 11:54:01 +00:00
|
|
|
assert newStdcpp -> !runtimeOnly;
|
2015-08-23 16:17:15 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
runtimePkgs = with pkgs; [
|
|
|
|
# Required
|
|
|
|
glib
|
|
|
|
gtk2
|
|
|
|
bzip2
|
|
|
|
zlib
|
|
|
|
gdk_pixbuf
|
|
|
|
|
|
|
|
# Without these it silently fails
|
|
|
|
xlibs.libXinerama
|
|
|
|
xlibs.libXdamage
|
|
|
|
xlibs.libXcursor
|
|
|
|
xlibs.libXrender
|
|
|
|
xlibs.libXScrnSaver
|
2016-09-27 23:27:49 +01:00
|
|
|
xlibs.libXxf86vm
|
2015-08-23 16:17:15 +01:00
|
|
|
xlibs.libXi
|
|
|
|
xlibs.libSM
|
|
|
|
xlibs.libICE
|
|
|
|
gnome2.GConf
|
|
|
|
freetype
|
|
|
|
curl
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
fontconfig
|
|
|
|
cairo
|
|
|
|
pango
|
|
|
|
expat
|
|
|
|
dbus
|
|
|
|
cups
|
|
|
|
libcap
|
|
|
|
SDL2
|
|
|
|
libusb1
|
|
|
|
dbus_glib
|
|
|
|
libav
|
|
|
|
atk
|
|
|
|
# Only libraries are needed from those two
|
|
|
|
udev182
|
|
|
|
networkmanager098
|
|
|
|
|
|
|
|
# Verified games requirements
|
|
|
|
xlibs.libXmu
|
|
|
|
xlibs.libxcb
|
|
|
|
xlibs.libpciaccess
|
|
|
|
mesa_glu
|
|
|
|
libuuid
|
|
|
|
libogg
|
|
|
|
libvorbis
|
|
|
|
SDL
|
|
|
|
SDL2_image
|
|
|
|
glew110
|
|
|
|
libidn
|
|
|
|
|
|
|
|
# Other things from runtime
|
|
|
|
xlibs.libXinerama
|
|
|
|
flac
|
|
|
|
freeglut
|
|
|
|
libjpeg
|
|
|
|
libpng12
|
|
|
|
libsamplerate
|
|
|
|
libmikmod
|
|
|
|
libtheora
|
|
|
|
pixman
|
|
|
|
speex
|
|
|
|
SDL_image
|
|
|
|
SDL_ttf
|
|
|
|
SDL_mixer
|
|
|
|
SDL2_net
|
|
|
|
SDL2_ttf
|
|
|
|
SDL2_mixer
|
|
|
|
gstreamer
|
|
|
|
gst_plugins_base
|
2016-01-15 11:54:01 +00:00
|
|
|
] ++ lib.optional (!newStdcpp) gcc48.cc;
|
2015-08-23 16:17:15 +01:00
|
|
|
|
|
|
|
overridePkgs = with pkgs; [
|
2016-05-15 00:35:08 +01:00
|
|
|
libgpgerror
|
2015-08-23 16:17:15 +01:00
|
|
|
libpulseaudio
|
|
|
|
alsaLib
|
|
|
|
openalSoft
|
2016-03-28 23:14:27 +01:00
|
|
|
libva
|
2016-11-08 05:18:25 +00:00
|
|
|
openssl-steam
|
2016-01-15 11:54:01 +00:00
|
|
|
] ++ lib.optional newStdcpp gcc.cc;
|
2015-08-23 16:17:15 +01:00
|
|
|
|
|
|
|
ourRuntime = if runtimeOnly then []
|
|
|
|
else if nativeOnly then runtimePkgs ++ overridePkgs
|
|
|
|
else overridePkgs;
|
2016-01-15 11:54:01 +00:00
|
|
|
steamRuntime = lib.optional (!nativeOnly) steam-runtime;
|
2015-08-23 16:17:15 +01:00
|
|
|
|
2016-05-15 00:35:08 +01:00
|
|
|
allPkgs = ourRuntime ++ steamRuntime;
|
|
|
|
|
2015-08-23 16:17:15 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "steam-runtime-wrapped";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
2015-10-20 15:08:44 +01:00
|
|
|
builder = ./build-wrapped.sh;
|
2015-08-23 16:17:15 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2016-05-15 00:35:08 +01:00
|
|
|
buildDir "${toString steam-runtime.libs}" "${toString (map lib.getLib allPkgs)}"
|
|
|
|
buildDir "${toString steam-runtime.bins}" "${toString (map lib.getBin allPkgs)}"
|
2015-08-23 16:17:15 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta.hydraPlatforms = [];
|
|
|
|
}
|