about summary refs log tree commit diff
path: root/pkgs/applications/misc/minigalaxy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/minigalaxy/default.nix')
-rw-r--r--pkgs/applications/misc/minigalaxy/default.nix61
1 files changed, 33 insertions, 28 deletions
diff --git a/pkgs/applications/misc/minigalaxy/default.nix b/pkgs/applications/misc/minigalaxy/default.nix
index ad694c01cdcba..d98ecb21daafb 100644
--- a/pkgs/applications/misc/minigalaxy/default.nix
+++ b/pkgs/applications/misc/minigalaxy/default.nix
@@ -1,77 +1,82 @@
 { lib
 , fetchFromGitHub
-, docutils
-, gettext
 , glibcLocales
 , glib-networking
 , gobject-introspection
 , gtk3
-, python3
+, libnotify
 , python3Packages
 , steam-run
+, substituteAll
 , unzip
 , webkitgtk
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 python3Packages.buildPythonApplication rec {
   pname = "minigalaxy";
-  version = "1.2.2";
+  version = "1.3.0";
 
   src = fetchFromGitHub {
     owner = "sharkwouter";
-    repo = pname;
+    repo = "minigalaxy";
     rev = "refs/tags/${version}";
-    sha256 = "sha256-bpNtdMYBl2dJ4PQsxkhm/Y+3A0dD/Y2XC0VaUYyRhvM=";
+    hash = "sha256-CMPBKnNrcjHVpsbBjY97FiygEJNG9jKHR/LoVMfuxG4=";
   };
 
-  checkPhase = ''
-    runHook preCheck
-    env HOME=$PWD LC_ALL=en_US.UTF-8 pytest
-    runHook postCheck
+  patches = [
+    (substituteAll {
+      src = ./inject-launcher-steam-run.diff;
+      steamrun = lib.getExe steam-run;
+     })
+  ];
+
+  postPatch = ''
+    substituteInPlace minigalaxy/installer.py \
+      --replace-fail '"unzip"' "\"${lib.getExe unzip}\"" \
+      --replace-fail "'unzip'" "\"${lib.getExe unzip}\""
   '';
 
   nativeBuildInputs = [
-    gettext
-    wrapGAppsHook
+    wrapGAppsHook3
     gobject-introspection
   ];
 
   buildInputs = [
     glib-networking
     gtk3
+    libnotify
   ];
 
   nativeCheckInputs = with python3Packages; [
     glibcLocales
-    pytest
-    tox
+    pytestCheckHook
+    simplejson
   ];
 
+  preCheck = ''
+    export HOME=$(mktemp -d)
+  '';
+
   pythonPath = [
-    docutils
-    python3.pkgs.pygobject3
-    python3.pkgs.requests
-    python3.pkgs.setuptools
-    python3.pkgs.simplejson
-    steam-run
-    unzip
+    python3Packages.pygobject3
+    python3Packages.requests
     webkitgtk
   ];
 
-  # Run Linux games using the Steam Runtime by using steam-run in the wrapper
-  # FIXME: not working with makeBinaryWrapper
-  postFixup = ''
-    sed -e 's#exec -a "$0"#exec -a "$0" ${steam-run}/bin/steam-run#' -i $out/bin/minigalaxy
+  dontWrapGApps = true;
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
   meta = with lib; {
     homepage = "https://sharkwouter.github.io/minigalaxy/";
     changelog = "https://github.com/sharkwouter/minigalaxy/blob/${version}/CHANGELOG.md";
     downloadPage = "https://github.com/sharkwouter/minigalaxy/releases";
-    description = "A simple GOG client for Linux";
+    description = "Simple GOG client for Linux";
     license = licenses.gpl3;
-    maintainers = with maintainers; [ ];
+    maintainers = [ ];
     platforms = platforms.linux;
   };
 }