about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSolene Rapenne <solene@perso.pw>2021-12-17 23:06:54 +0100
committerSolene Rapenne <solene@perso.pw>2022-01-06 13:34:55 +0100
commit74ae0ea8b794b9ee055a942991ecd86504dd4131 (patch)
treefe481d9b6c552ad9efe4706f8104e31bc98c9311
parentc5440a4ed7bf346f4f0c7f19ad07a6959fb59db4 (diff)
minigalaxy: init at 1.1.0
-rw-r--r--pkgs/applications/misc/minigalaxy/default.nix76
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/applications/misc/minigalaxy/default.nix b/pkgs/applications/misc/minigalaxy/default.nix
new file mode 100644
index 0000000000000..6a1f14cbd44a3
--- /dev/null
+++ b/pkgs/applications/misc/minigalaxy/default.nix
@@ -0,0 +1,76 @@
+{ lib
+, fetchFromGitHub
+, docutils
+, gettext
+, glibcLocales
+, glib-networking
+, gobject-introspection
+, gtk3
+, python3
+, python3Packages
+, steam-run-native
+, unzip
+, webkitgtk
+, wrapGAppsHook
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "minigalaxy";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "sharkwouter";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-BbtwLuG5TH/+06Ez8+mwSAjG1IWg9/3uxzjmgPHczAw=";
+  };
+
+  checkPhase = ''
+    runHook preCheck
+    env HOME=$PWD LC_ALL=en_US.UTF-8 pytest
+    runHook postCheck
+  '';
+
+  nativeBuildInputs = [
+    gettext
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib-networking
+    gobject-introspection
+    gtk3
+  ];
+
+  checkInputs = with python3Packages; [
+    glibcLocales
+    pytest
+    tox
+  ];
+
+  pythonPath = [
+    docutils
+    python3.pkgs.pygobject3
+    python3.pkgs.requests
+    python3.pkgs.setuptools
+    python3.pkgs.simplejson
+    steam-run-native
+    unzip
+    webkitgtk
+  ];
+
+  # Run Linux games using the Steam Runtime by using steam-run in the wrapper
+  postFixup = ''
+    sed -e 's#exec -a "$0"#exec -a "$0" ${steam-run-native}/bin/steam-run#' -i $out/bin/minigalaxy
+  '';
+
+  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";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ srapenne ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 301afaac82ee9..eedfaf58f29e9 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -26949,6 +26949,8 @@ with pkgs;
 
   minicom = callPackage ../tools/misc/minicom { };
 
+  minigalaxy = callPackage ../applications/misc/minigalaxy { };
+
   minimodem = callPackage ../applications/radio/minimodem { };
 
   minidjvu = callPackage ../applications/graphics/minidjvu { };