summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2021-06-18 21:47:51 +0300
committerArtturin <Artturin@artturin.com>2021-06-22 04:52:16 +0300
commit09a52f7662648a558f7d01b483138b31dd97505d (patch)
tree5751cb423e1cb5a6c73983e451802f0af514e28e /pkgs/games
parentfddaadcdf45a641fff892e5664aab9da4d1f237d (diff)
downloadnixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.tar
nixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.tar.gz
nixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.tar.bz2
nixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.tar.lz
nixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.tar.xz
nixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.tar.zst
nixpkgs-09a52f7662648a558f7d01b483138b31dd97505d.zip
grapejuice: init at 3.11.4
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/grapejuice/default.nix95
1 files changed, 95 insertions, 0 deletions
diff --git a/pkgs/games/grapejuice/default.nix b/pkgs/games/grapejuice/default.nix
new file mode 100644
index 00000000000..1cb27f7b8c5
--- /dev/null
+++ b/pkgs/games/grapejuice/default.nix
@@ -0,0 +1,95 @@
+{ lib
+, fetchFromGitLab
+, gobject-introspection
+, python3Packages
+, gtk3
+, wrapGAppsHook
+, glib
+, cairo
+, desktop-file-utils
+, xdg-utils
+, xdg-user-dirs
+, wine
+, winetricks
+}:
+
+python3Packages.buildPythonApplication rec  {
+  pname = "grapejuice";
+  version = "3.12.5";
+
+  src = fetchFromGitLab {
+    owner = "BrinkerVII";
+    repo = "grapejuice";
+    rev = "v${version}";
+    sha256 = "1xgxyfwwghy9l17i6y40axdrpp4fgxgdr5y97flwmfivif01ifs1";
+  };
+
+  nativeBuildInputs = [
+    gobject-introspection
+    desktop-file-utils
+    glib
+    gtk3
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    cairo
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    requests
+    pygobject3
+    dbus-python
+    packaging
+    psutil
+    setuptools
+  ];
+
+  dontWrapGApps = true;
+
+  makeWrapperArgs = [
+    "\${gappsWrapperArgs[@]}"
+    "--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs xdg-utils wine (winetricks.override { wine = wine; }) ]}"
+  ];
+
+  postPatch = ''
+    substituteInPlace requirements.txt \
+      --replace "PyGObject-stubs" ""
+
+    substituteInPlace src/grapejuice_common/assets/desktop/grapejuice.desktop \
+      --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
+      --replace \$GRAPEJUICE_ICON grapejuice
+
+    substituteInPlace src/grapejuice_common/assets/desktop/roblox-player.desktop \
+      --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
+      --replace \$PLAYER_ICON "grapejuice-roblox-player"
+
+    substituteInPlace src/grapejuice_common/assets/desktop/roblox-app.desktop \
+      --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
+      --replace \$PLAYER_ICON "grapejuice-roblox-player"
+
+    substituteInPlace src/grapejuice_common/assets/desktop/roblox-studio.desktop \
+      --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
+      --replace \$STUDIO_ICON "grapejuice-roblox-studio"
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/share/icons" "$out/share/applications" "$out/share/mime/packages"
+    cp -r src/grapejuice_common/assets/desktop/* $out/share/applications/
+    cp -r src/grapejuice_common/assets/icons $out/share/
+    cp src/grapejuice_common/assets/mime_xml/*.xml $out/share/mime/packages/
+  '';
+
+  # No tests
+  doCheck = false;
+
+  pythonImportsCheck = [ "grapejuice" ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/brinkervii/grapejuice";
+    description = "Simple Wine+Roblox management tool";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ artturin ];
+  };
+}