summary refs log tree commit diff
path: root/pkgs/games/steam/runtime-wrapped.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2015-08-23 18:17:15 +0300
committerNikolay Amiantov <ab@fmap.me>2015-10-11 17:57:31 +0300
commit6c9ee645ec0fb4a140ddf70525ea15df6d1827c7 (patch)
treea3b77da881a5c765f88b77f5d27177ca00b00d57 /pkgs/games/steam/runtime-wrapped.nix
parent8b034964d1e8aca285f601680634130fc954070c (diff)
downloadnixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.tar
nixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.tar.gz
nixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.tar.bz2
nixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.tar.lz
nixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.tar.xz
nixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.tar.zst
nixlib-6c9ee645ec0fb4a140ddf70525ea15df6d1827c7.zip
steam: add steamPackages namespace, build our own runtime
Diffstat (limited to 'pkgs/games/steam/runtime-wrapped.nix')
-rw-r--r--pkgs/games/steam/runtime-wrapped.nix109
1 files changed, 109 insertions, 0 deletions
diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix
new file mode 100644
index 000000000000..238626c4ab4c
--- /dev/null
+++ b/pkgs/games/steam/runtime-wrapped.nix
@@ -0,0 +1,109 @@
+{ stdenv, perl, pkgs, steam-runtime
+, nativeOnly ? false
+, runtimeOnly ? false
+}:
+
+assert !(nativeOnly && runtimeOnly);
+
+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
+    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
+    openssl
+    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
+  ];
+
+  overridePkgs = with pkgs; [
+    gcc48.cc # libstdc++
+    libpulseaudio
+    alsaLib
+    openalSoft
+  ];
+
+  ourRuntime = if runtimeOnly then []
+               else if nativeOnly then runtimePkgs ++ overridePkgs
+               else overridePkgs;
+  steamRuntime = stdenv.lib.optional (!nativeOnly) steam-runtime;
+
+in stdenv.mkDerivation rec {
+  name = "steam-runtime-wrapped";
+
+  allPkgs = ourRuntime ++ steamRuntime;
+
+  nativeBuildInputs = [ perl ];
+
+  builder = ./build-runtime.sh;
+
+  installPhase = ''
+    buildDir "${toString steam-runtime.libs}" "$allPkgs"
+    buildDir "${toString steam-runtime.bins}" "$allPkgs"
+  '';
+
+  meta.hydraPlatforms = [];
+}