git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #127397 from Artturin/add-grapejuice

grapejuice: init at 3.11.4

commitcb86e4e62fa55037c1311bff0d6988f142914270 authorSandro <sandro.jaeckel@gmail.com> dateTue 22 Jun 2021, 10:12 (5 years ago) parentbdb83d609a52f7
2 files changed+99
pkgs/games/grapejuice/default.nix+95 pkgs/top-level/all-packages.nix+4
pkgs/games/grapejuice/default.nixnew file+95
@@ -0,0 +1,95 @@
1+{ lib
2+, fetchFromGitLab
3+, gobject-introspection
4+, python3Packages
5+, gtk3
6+, wrapGAppsHook
7+, glib
8+, cairo
9+, desktop-file-utils
10+, xdg-utils
11+, xdg-user-dirs
12+, wine
13+, winetricks
14+}:
15+
16+python3Packages.buildPythonApplication rec {
17+ pname = "grapejuice";
18+ version = "3.12.5";
19+
20+ src = fetchFromGitLab {
21+ owner = "BrinkerVII";
22+ repo = "grapejuice";
23+ rev = "v${version}";
24+ sha256 = "1xgxyfwwghy9l17i6y40axdrpp4fgxgdr5y97flwmfivif01ifs1";
25+ };
26+
27+ nativeBuildInputs = [
28+ gobject-introspection
29+ desktop-file-utils
30+ glib
31+ gtk3
32+ wrapGAppsHook
33+ ];
34+
35+ buildInputs = [
36+ cairo
37+ ];
38+
39+ propagatedBuildInputs = with python3Packages; [
40+ requests
41+ pygobject3
42+ dbus-python
43+ packaging
44+ psutil
45+ setuptools
46+ ];
47+
48+ dontWrapGApps = true;
49+
50+ makeWrapperArgs = [
51+ "\${gappsWrapperArgs[@]}"
52+ "--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs xdg-utils wine (winetricks.override { wine = wine; }) ]}"
53+ ];
54+
55+ postPatch = ''
56+ substituteInPlace requirements.txt \
57+ --replace "PyGObject-stubs" ""
58+
59+ substituteInPlace src/grapejuice_common/assets/desktop/grapejuice.desktop \
60+ --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
61+ --replace \$GRAPEJUICE_ICON grapejuice
62+
63+ substituteInPlace src/grapejuice_common/assets/desktop/roblox-player.desktop \
64+ --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
65+ --replace \$PLAYER_ICON "grapejuice-roblox-player"
66+
67+ substituteInPlace src/grapejuice_common/assets/desktop/roblox-app.desktop \
68+ --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
69+ --replace \$PLAYER_ICON "grapejuice-roblox-player"
70+
71+ substituteInPlace src/grapejuice_common/assets/desktop/roblox-studio.desktop \
72+ --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
73+ --replace \$STUDIO_ICON "grapejuice-roblox-studio"
74+ '';
75+
76+ postInstall = ''
77+ mkdir -p "$out/share/icons" "$out/share/applications" "$out/share/mime/packages"
78+ cp -r src/grapejuice_common/assets/desktop/* $out/share/applications/
79+ cp -r src/grapejuice_common/assets/icons $out/share/
80+ cp src/grapejuice_common/assets/mime_xml/*.xml $out/share/mime/packages/
81+ '';
82+
83+ # No tests
84+ doCheck = false;
85+
86+ pythonImportsCheck = [ "grapejuice" ];
87+
88+ meta = with lib; {
89+ homepage = "https://gitlab.com/brinkervii/grapejuice";
90+ description = "Simple Wine+Roblox management tool";
91+ license = licenses.gpl3Plus;
92+ platforms = platforms.linux;
93+ maintainers = with maintainers; [ artturin ];
94+ };
95+}
pkgs/top-level/all-packages.nix+4
@@ -2821,6 +2821,10 @@ in
28212821
28222822 gti = callPackage ../tools/misc/gti { };
28232823
2824+ grapejuice = callPackage ../games/grapejuice {
2825+ wine = wineWowPackages.unstable;
2826+ };
2827+
28242828 hdate = callPackage ../applications/misc/hdate { };
28252829
28262830 heatseeker = callPackage ../tools/misc/heatseeker { };