summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-04-18 01:36:40 +0200
committerGitHub <noreply@github.com>2017-04-18 01:36:40 +0200
commit81e6e211750eca8760b57b184ac00b66db710f85 (patch)
treed534c49e944d4636cb02377c1e633ac513e16c58 /pkgs/games
parentae49647e9cbcbaa56231232137c210a710222c47 (diff)
parent57a29cab6a3955e2f8795aed8142e51d73f7d26d (diff)
downloadnixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.tar
nixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.tar.gz
nixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.tar.bz2
nixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.tar.lz
nixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.tar.xz
nixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.tar.zst
nixpkgs-81e6e211750eca8760b57b184ac00b66db710f85.zip
Merge pull request #24521 from orivej/instead-launcher
instead-launcher: init at 0.6.3
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/instead-launcher/default.nix32
-rw-r--r--pkgs/games/instead-launcher/path.patch39
2 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/games/instead-launcher/default.nix b/pkgs/games/instead-launcher/default.nix
new file mode 100644
index 00000000000..6515db9dab3
--- /dev/null
+++ b/pkgs/games/instead-launcher/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, instead, qmake4Hook, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "instead-launcher-${version}";
+
+  version = "0.6.3";
+
+  src = fetchFromGitHub {
+    owner = "instead-hub";
+    repo = "instead-launcher";
+    rev = version;
+    sha256 = "1q0hdgfy9pr48zvxr9x614ka6bd0g8sicdk2a673nwfdyd41p9cw";
+  };
+
+  patches = [ ./path.patch ];
+
+  postPatch = ''
+    substituteInPlace platform.cpp --subst-var-by instead ${instead}
+  '';
+
+  nativeBuildInputs = [ qmake4Hook ];
+
+  buildInputs = [ zlib ];
+
+  meta = with stdenv.lib; {
+    homepage = https://instead.syscall.ru/wiki/en/instead-launcher;
+    description = "Install and play games from INSTEAD repository";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/pkgs/games/instead-launcher/path.patch b/pkgs/games/instead-launcher/path.patch
new file mode 100644
index 00000000000..f63737bfb16
--- /dev/null
+++ b/pkgs/games/instead-launcher/path.patch
@@ -0,0 +1,39 @@
+From c7460a7fc255ef4e8e0e37798605c4d8bb50633d Mon Sep 17 00:00:00 2001
+From: Orivej Desh <orivej@gmx.fr>
+Date: Sat, 1 Apr 2017 01:30:37 +0000
+Subject: [PATCH] path
+
+---
+ mainwindow.cpp | 2 +-
+ platform.cpp   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mainwindow.cpp b/mainwindow.cpp
+index 9687c4e..234b176 100644
+--- a/mainwindow.cpp
++++ b/mainwindow.cpp
+@@ -688,7 +688,7 @@ void MainWindow::loadConfig() {
+     if ( args.contains( "default-gamespath" ) )
+ 	defGamesPath = args["default-gamespath"].toString();
+ 
+-    QString insteadPath = conf.value("InsteadPath", defInsteadPath).toString();
++    QString insteadPath = defInsteadPath;
+     bool autoRefresh = conf.value("AutoRefresh", "false").toString() == "true";
+     bool autoRefreshSW = conf.value("AutoRefreshSW", "false").toString() == "true";
+     QString lang = conf.value( "Language", "*" ).toString();
+diff --git a/platform.cpp b/platform.cpp
+index bda86be..c356f1c 100644
+--- a/platform.cpp
++++ b/platform.cpp
+@@ -22,7 +22,7 @@ QString getConfigPath() {
+ }
+ 
+ QString getDefaultInterpreterPath() {
+-    return "/usr/local/bin/sdl-instead";
++    return "@instead@/bin/sdl-instead";
+ }
+ 
+ #elif defined(Q_OS_WIN)
+-- 
+2.12.2
+