summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-21 11:05:58 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-21 11:05:58 +0200
commita13802b2c8568426a6d31ab08aaaf2965010a6ce (patch)
treed3bbadb2a5cae436931440b754b96c3ced2771be /pkgs/games
parent15f6dcb668dcb6b4bfe33f47091273f978dcc0bf (diff)
parent581637ba5a512e1179cdaf0108931fca32892b32 (diff)
downloadnixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.tar
nixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.tar.gz
nixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.tar.bz2
nixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.tar.lz
nixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.tar.xz
nixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.tar.zst
nixlib-a13802b2c8568426a6d31ab08aaaf2965010a6ce.zip
Merge remote-tracking branch 'origin/master' into gcc-6
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/default.nix6
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/skip-ruby.patch24
-rw-r--r--pkgs/games/factorio/default.nix11
-rw-r--r--pkgs/games/factorio/fetch.sh2
-rw-r--r--pkgs/games/qgo/default.nix48
-rw-r--r--pkgs/games/qgo/fix-paths.patch50
-rw-r--r--pkgs/games/scummvm/default.nix7
-rw-r--r--pkgs/games/uqm/default.nix2
8 files changed, 122 insertions, 28 deletions
diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix
index ce935512178e..ba9cd1e58055 100644
--- a/pkgs/games/dwarf-fortress/dfhack/default.nix
+++ b/pkgs/games/dwarf-fortress/dfhack/default.nix
@@ -7,12 +7,12 @@ let
   dfVersion = "0.43.05";
   # version = "${dfVersion}-r1";
   # rev = "refs/tags/${version}";
-  version = "${dfVersion}-alpha4";
+  version = "${dfVersion}-r1";
   rev = "refs/tags/${version}";
-  sha256 = "0wnwdapw955k69ds5xh5qsh7h0l547wjxgcy8hkvly6wp5c16sls";
+  sha256 = "1hw0miimzx52p36jm9bimsm5j68rb7dd9kw0yivcwbwixbajsi1w";
 
   # revision of library/xml submodule
-  xmlRev = "bb4228f58b1601c4868c95be6763f5ff2e5d0a08";
+  xmlRev = "a8e80088b9cc934da993dc244ece2d0ae14143da";
 
   arch =
     if stdenv.system == "x86_64-linux" then "64"
diff --git a/pkgs/games/dwarf-fortress/dfhack/skip-ruby.patch b/pkgs/games/dwarf-fortress/dfhack/skip-ruby.patch
index 619060dc2534..877f6c3d215a 100644
--- a/pkgs/games/dwarf-fortress/dfhack/skip-ruby.patch
+++ b/pkgs/games/dwarf-fortress/dfhack/skip-ruby.patch
@@ -1,16 +1,10 @@
-diff -ru3 dfhack-ae59b4f/plugins/ruby/CMakeLists.txt dfhack-ae59b4f-new/plugins/ruby/CMakeLists.txt
---- dfhack-ae59b4f/plugins/ruby/CMakeLists.txt	1970-01-01 03:00:01.000000000 +0300
-+++ dfhack-ae59b4f-new/plugins/ruby/CMakeLists.txt	2016-11-23 15:29:09.907286546 +0300
-@@ -1,3 +1,4 @@
-+IF(FALSE)
- IF (APPLE)
-     SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/osx${DFHACK_BUILD_ARCH}/libruby.dylib)
-     SET(RUBYLIB_INSTALL_NAME "libruby.dylib")
-@@ -48,6 +49,7 @@
-             "482c1c418f4ee1a5f04203eee1cda0ef")
-     ENDIF()
- ENDIF()
-+ENDIF()
+diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt
+index f1ef12ac..0976e18a 100644
+--- a/plugins/ruby/CMakeLists.txt
++++ b/plugins/ruby/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ # Allow build system to turn off downloading of libruby.so.
+-OPTION(DOWNLOAD_RUBY "Download prebuilt libruby.so for ruby plugin." ON)
++OPTION(DOWNLOAD_RUBY "Download prebuilt libruby.so for ruby plugin." OFF)
  
- IF (APPLE OR UNIX)
-     SET(RUBYAUTOGEN ruby-autogen-gcc.rb)
+ IF (DOWNLOAD_RUBY)
diff --git a/pkgs/games/factorio/default.nix b/pkgs/games/factorio/default.nix
index 861a44fea8c5..5c24c3ec8076 100644
--- a/pkgs/games/factorio/default.nix
+++ b/pkgs/games/factorio/default.nix
@@ -10,7 +10,7 @@ assert releaseType == "alpha" || releaseType == "headless" || releaseType == "de
 
 with stdenv.lib;
 let
-  version = if releaseType != "demo" then "0.15.16" else "0.14.23";
+  version = if releaseType != "demo" then "0.15.30" else "0.15.25";
 
   arch = if stdenv.system == "x86_64-linux" then {
     inUrl = "linux64";
@@ -23,13 +23,12 @@ let
   authenticatedFetch = callPackage ./fetch.nix { inherit username password; };
 
   fetch = rec {
-    extension = if releaseType != "demo" then "tar.xz" else "tar.gz";
     url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
-    name = "factorio_${releaseType}_${arch.inTar}-${version}.${extension}";
+    name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz";
     x64 = {
-      headless =           fetchurl { inherit name url; sha256 = "0ig0nrvqllb9294qn2ci5j5s31ycsjn23bp6hc633xqkgfmklmic"; };
-      alpha    = authenticatedFetch { inherit name url; sha256 = "0bf0z6fi0cpbq487hz4sz8ljapchzhld01sj767wsldakjfkm9g9"; };
-      demo     =           fetchurl { inherit name url; sha256 = "10a2lwmspqviwgymn3zhjgpiynsa6dplgnikdirma5sl2hhcfb6s"; };
+      headless =           fetchurl { inherit name url; sha256 = "0nmr73i9acnqgphfmsps7f8jlw0f2gyal9l8pldlp4rk0cjgvszy"; };
+      alpha    = authenticatedFetch { inherit name url; sha256 = "1ydh44na2lbvdv4anrblym7d6wxwapfbwap40n3722llrsad0zsz"; };
+      demo     =           fetchurl { inherit name url; sha256 = "1qz6g8mf221ic663zk92l6rs77ggfydaw2d8g2s7wy0j9097qbsl"; };
     };
     i386 = {
       headless = abort "Factorio 32-bit headless binaries are not available for download.";
diff --git a/pkgs/games/factorio/fetch.sh b/pkgs/games/factorio/fetch.sh
index 30d9c9fdefe0..312dc9b6d61e 100644
--- a/pkgs/games/factorio/fetch.sh
+++ b/pkgs/games/factorio/fetch.sh
@@ -33,7 +33,7 @@ $curl --data-urlencode csrf_token="$csrf" \
 
 if grep -q 'Location: https://' headers; then
     # Now download. We need --insecure for this, but the sha256 should cover us.
-    $curl --insecure --location $url > $out
+    $curl --insecure --location --fail $url > $out || { echo "Login succeeded, but subsequent fetch failed."; exit 1; }
     set +x
 else
     set +x
diff --git a/pkgs/games/qgo/default.nix b/pkgs/games/qgo/default.nix
new file mode 100644
index 000000000000..b6a76001ad09
--- /dev/null
+++ b/pkgs/games/qgo/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, makeWrapper, qmake, qt56 }:
+
+stdenv.mkDerivation rec {
+  name = "qgo-${version}";
+  version = "unstable-2016-06-23";
+
+  meta = with stdenv.lib; {
+    description = "A Go client based on Qt5";
+    longDescription = ''
+      qGo is a Go Client based on Qt 5. It supports playing online at
+      IGS-compatible servers (including some special tweaks for WING and LGS,
+      also NNGS was reported to work) and locally against gnugo (or other
+      GTP-compliant engines). It also has rudimentary support for editing SGF
+      files and parital support for CyberORO/WBaduk, Tygem, Tom, and eWeiqi
+      (developers of these backends are currently inactive, everybody is welcome
+      to take them over).
+
+      Go is an ancient Chinese board game. It's called "圍棋(Wei Qi)" in
+      Chinese, "囲碁(Yi Go)" in Japanese, "바둑(Baduk)" in Korean.
+    '';
+    homepage = "https://github.com/pzorin/qgo";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ zalakain ];
+  };
+
+  src = fetchFromGitHub {
+    owner = "pzorin";
+    repo = "qgo";
+    rev = "1e65b0c74914e534ea4d040f8f0ef8908383e374";
+    sha256 = "1xzkayclmhsi07p9mnbf8185jw8n5ikxp2mik3x8qz1i6rmrfl5b";
+  };
+
+  patches = [ ./fix-paths.patch ];
+  postPatch = ''
+    sed -i 's|@out@|'"''${out}"'|g' src/src.pro src/defines.h
+  '';
+  nativeBuildInputs = [ makeWrapper qmake ];
+  # qt58 does not provide platform plugins
+  # We need lib/qt*/plugins/platforms/libqxcb.so
+  buildInputs = with qt56; [ qtbase.out qtmultimedia qttranslations ];
+  enableParallelBuilding = true;
+  postFixup = ''
+    # libQt5XcbQpa is a platform plugin dependency and doesn't get linked
+    patchelf --add-needed libQt5XcbQpa.so.5 $out/bin/qgo
+    wrapProgram $out/bin/qgo \
+      --set QT_QPA_PLATFORM_PLUGIN_PATH "${qt56.qtbase}/lib/qt-5.6/plugins/platforms/"
+  '';
+}
diff --git a/pkgs/games/qgo/fix-paths.patch b/pkgs/games/qgo/fix-paths.patch
new file mode 100644
index 000000000000..c1d1e399ec1a
--- /dev/null
+++ b/pkgs/games/qgo/fix-paths.patch
@@ -0,0 +1,50 @@
+diff --git a/src/defines.h b/src/defines.h
+index 5d40955..82d0627 100644
+--- a/src/defines.h
++++ b/src/defines.h
+@@ -48,7 +48,7 @@
+ * GNUgo default level
+ */
+ #define DEFAULT_ENGINE "gnugo"
+-#define DEFAULT_ENGINE_PATH "/usr/games/"
++#define DEFAULT_ENGINE_PATH ""
+ #define DEFAULT_ENGINE_OPTIONS "--mode gtp --quiet --level 10"
+ 
+ 
+@@ -220,8 +220,8 @@ extern QString applicationPath;
+ 	#define SOUND_PATH_PREFIX			"qGo.app/Contents/Resources/Sounds/"
+     #define TRANSLATIONS_PATH		"qGo.app/Contents/Resources/Translations/"
+ #else
+-    #define SOUND_PATH_PREFIX		"/usr/share/qgo/sounds/"
+-    #define TRANSLATIONS_PATH		"/usr/share/qgo/languages"
++    #define SOUND_PATH_PREFIX		"/@out@/share/qgo/sounds/"
++    #define TRANSLATIONS_PATH		"/@out@/share/qgo/languages"
+ #endif
+ 
+ #endif
+diff --git a/src/src.pro b/src/src.pro
+index f989ce7..b7d691f 100644
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -165,17 +165,17 @@ SOURCES += displayboard.cpp \
+     newgamedialog.cpp
+ 
+ unix*:!macx-* {
+-    QGO_INSTALL_PATH = /usr/share/qgo
+-    QGO_INSTALL_BIN_PATH = /usr/bin
++    QGO_INSTALL_PATH = @out@/share/qgo
++    QGO_INSTALL_BIN_PATH = /@out@/bin
+ 
+-    icon.path = /usr/share/pixmaps
++    icon.path = @out@/share/pixmaps
+     icon.files = resources/pics/qgo.png
+     icon.files += resources/pics/qgo_16x16.xpm
+     icon.files += resources/pics/qgo_32x32.xpm
+     icon.files += resources/pics/qgo_48x48.png
+     icon.files += resources/pics/qgo_48x48.xpm
+     INSTALLS += icon
+-    desktopfile.path = /usr/share/applications
++    desktopfile.path = @out@/share/applications
+     desktopfile.files = qgo.desktop
+     INSTALLS += desktopfile
+ }
diff --git a/pkgs/games/scummvm/default.nix b/pkgs/games/scummvm/default.nix
index 29ba75f9aa24..e965fc459ad8 100644
--- a/pkgs/games/scummvm/default.nix
+++ b/pkgs/games/scummvm/default.nix
@@ -1,4 +1,7 @@
-{ stdenv, fetchurl, SDL, zlib, libmpeg2, libmad, libogg, libvorbis, flac, alsaLib, mesa }:
+{ stdenv
+, fetchurl, SDL, zlib, libmpeg2, libmad, libogg, libvorbis, flac, alsaLib, mesa
+, hostPlatform
+}:
 
 stdenv.mkDerivation rec {
   name = "scummvm-1.9.0";
@@ -16,7 +19,7 @@ stdenv.mkDerivation rec {
     preConfigure = ''
       # Remove the --build flag set by the gcc cross wrapper setup
       # hook
-      export configureFlags="--host=${stdenv.cross.config}"
+      export configureFlags="--host=${hostPlatform.config}"
     '';
     postConfigure = ''
       # They use 'install -s', that calls the native strip instead of the cross
diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix
index d6bcb787d60c..d1416b0685a7 100644
--- a/pkgs/games/uqm/default.nix
+++ b/pkgs/games/uqm/default.nix
@@ -18,7 +18,7 @@ let
     inherit stdenv requireFile writeText fetchurl haskellPackages;
   };
 
-  remixPacks = imap (num: sha256: fetchurl rec {
+  remixPacks = imap1 (num: sha256: fetchurl rec {
     name = "uqm-remix-disc${toString num}.uqm";
     url = "mirror://sourceforge/sc2/${name}";
     inherit sha256;