about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-08-14 13:46:33 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-08-14 13:46:33 +0200
commitcff9e6429a4341e924594f5e057b03ca8101b314 (patch)
treef8c1a31c9ad11b4c417b9c331747f3b3dc47bdf4 /pkgs/games
parenta6055b7d8705d3c3a008e67cde1d43cf5727f76b (diff)
parent8d56f2472e47a3f1f388b69c0ecc24421910d555 (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/azimuth/default.nix28
-rw-r--r--pkgs/games/opendune/default.nix24
-rw-r--r--pkgs/games/steam/chrootenv.nix15
3 files changed, 39 insertions, 28 deletions
diff --git a/pkgs/games/azimuth/default.nix b/pkgs/games/azimuth/default.nix
index 085bad674c791..8cb583e07d2b5 100644
--- a/pkgs/games/azimuth/default.nix
+++ b/pkgs/games/azimuth/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, SDL }:
+{ stdenv, fetchFromGitHub, SDL, which, installTool ? false }:
 
 stdenv.mkDerivation rec {
   pname = "azimuth";
@@ -11,7 +11,11 @@ stdenv.mkDerivation rec {
     sha256 = "1znfvpmqiixd977jv748glk5zc4cmhw5813zp81waj07r9b0828r";
   };
 
+  nativeBuildInputs = [ which ];
+  buildInputs = [ SDL ];
+
   preConfigure = ''
+    cat Makefile
     substituteInPlace data/azimuth.desktop \
       --replace Exec=azimuth "Exec=$out/bin/azimuth" \
       --replace "Version=%AZ_VERSION_NUMBER" "Version=${version}"
@@ -19,30 +23,12 @@ stdenv.mkDerivation rec {
 
   makeFlags = [
     "BUILDTYPE=release"
-  ];
+    "INSTALLDIR=$(out)"
+  ] ++ (if installTool then ["INSTALLTOOL=true"] else ["INSTALLTOOL=false"]);
 
-  buildInputs = [ SDL ];
 
   enableParallelBuilding = true;
 
-  # the game doesn't have an installation procedure
-  installPhase = ''
-    mkdir -p $out/bin
-    cp out/release/host/bin/azimuth $out/bin/azimuth
-    cp out/release/host/bin/editor $out/bin/azimuth-editor
-    cp out/release/host/bin/muse $out/bin/azimuth-muse
-    cp out/release/host/bin/zfxr $out/bin/azimuth-zfxr
-    mkdir -p $out/share/doc/azimuth
-    cp doc/* README.md LICENSE $out/share/doc/azimuth
-    mkdir -p $out/share/icons/hicolor/128x128/apps $out/share/icons/hicolor/64x64/apps $out/share/icons/hicolor/48x48/apps $out/share/icons/hicolor/32x32/apps
-    cp data/icons/icon_128x128.png $out/share/icons/hicolor/128x128/apps/azimuth.png
-    cp data/icons/icon_64x64.png $out/share/icons/hicolor/64x64/apps/azimuth.png
-    cp data/icons/icon_48x48.png $out/share/icons/hicolor/48x48/apps/azimuth.png
-    cp data/icons/icon_32x32.png $out/share/icons/hicolor/32x32/apps/azimuth.png
-    mkdir -p $out/share/applications
-    cp data/azimuth.desktop $out/share/applications
-  '';
-
   meta = {
     description = "A metroidvania game using only vectorial graphic";
     longDescription = ''
diff --git a/pkgs/games/opendune/default.nix b/pkgs/games/opendune/default.nix
index 0f045faf371eb..d2f1e27b10ecc 100644
--- a/pkgs/games/opendune/default.nix
+++ b/pkgs/games/opendune/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchFromGitHub, SDL, SDL_image, SDL_mixer }:
+{ stdenv, lib, fetchFromGitHub, pkgconfig
+, alsaLib, libpulseaudio, SDL2, SDL2_image, SDL2_mixer }:
 
 # - set the opendune configuration at ~/.config/opendune/opendune.ini:
 #     [opendune]
@@ -16,17 +17,30 @@ stdenv.mkDerivation rec {
     sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
   };
 
-  buildInputs = [ SDL SDL_image SDL_mixer ];
+  configureFlags = [
+    "--with-alsa=${lib.getLib alsaLib}/lib/libasound.so"
+    "--with-pulse=${lib.getLib libpulseaudio}/lib/libpulse.so"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ alsaLib libpulseaudio SDL2 SDL2_image SDL2_mixer ];
+
+  enableParallelBuilding = true;
 
   installPhase = ''
-    install -m 555 -D bin/opendune $out/bin/opendune
+    runHook preInstall
+
+    install -Dm555 -t $out/bin bin/opendune
+    install -Dm444 -t $out/share/doc/opendune enhancement.txt README.txt
+
+    runHook postInstall
   '';
 
   meta = with stdenv.lib; {
     description = "Dune, Reinvented";
     homepage = https://github.com/OpenDUNE/OpenDUNE;
     license = licenses.gpl2;
-    maintainers = [ maintainers.nand0p ];
-    platforms = platforms.linux;
+    maintainers = with maintainers; [ nand0p ];
   };
 }
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index 9f0ac916751d8..5c73e458c1ac4 100644
--- a/pkgs/games/steam/chrootenv.nix
+++ b/pkgs/games/steam/chrootenv.nix
@@ -48,7 +48,7 @@ let
 
   runSh = writeScript "run.sh" ''
     #!${runtimeShell}
-    runtime_paths="${lib.concatStringsSep ":" ldPath}"
+    runtime_paths="/lib32:/lib64:${lib.concatStringsSep ":" ldPath}"
     if [ "$1" == "--print-steam-runtime-library-paths" ]; then
       echo "$runtime_paths"
       exit 0
@@ -83,6 +83,17 @@ in buildFHSUserEnv rec {
     mono
     xorg.xkeyboardconfig
     xorg.libpciaccess
+    ## screeps dependencies
+    gnome3.gtk
+    dbus
+    zlib
+    glib
+    atk
+    cairo
+    freetype
+    gdk_pixbuf
+    pango
+    fontconfig
   ] ++ (if (!nativeOnly) then [
     (steamPackages.steam-runtime-wrapped.override {
       inherit runtimeOnly;
@@ -246,7 +257,7 @@ in buildFHSUserEnv rec {
         exit 1
       fi
       shift
-      ${lib.optionalString (!nativeOnly) "export LD_LIBRARY_PATH=${lib.concatStringsSep ":" ldPath}:$LD_LIBRARY_PATH"}
+      ${lib.optionalString (!nativeOnly) "export LD_LIBRARY_PATH=/lib32:/lib64:${lib.concatStringsSep ":" ldPath}:$LD_LIBRARY_PATH"}
       exec -- "$run" "$@"
     '';
   };