3 , gobject-introspection
19 python3Packages.buildPythonApplication rec {
23 src = fetchFromGitLab {
27 sha256 = "sha256-wwM3q8Z4bYZod7/KcGc/PXlyLQxLRPkF1TdtFcg8mNE=";
43 propagatedBuildInputs = with python3Packages; [
58 "\${gappsWrapperArgs[@]}"
59 "--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs wine winetricks pciutils glxinfo ]}"
60 # make xdg-open overrideable at runtime
61 "--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"
65 substituteInPlace src/grapejuice_common/assets/desktop/grapejuice.desktop \
66 --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
67 --replace \$GRAPEJUICE_GUI_EXECUTABLE "$out/bin/grapejuice-gui" \
68 --replace \$GRAPEJUICE_ICON grapejuice
70 substituteInPlace src/grapejuice_common/assets/desktop/roblox-player.desktop \
71 --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
72 --replace \$PLAYER_ICON "grapejuice-roblox-player"
74 substituteInPlace src/grapejuice_common/assets/desktop/roblox-app.desktop \
75 --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
76 --replace \$PLAYER_ICON "grapejuice-roblox-player"
78 substituteInPlace src/grapejuice_common/assets/desktop/roblox-studio.desktop \
79 --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \
80 --replace \$STUDIO_ICON "grapejuice-roblox-studio"
82 substituteInPlace src/grapejuice_common/paths.py \
83 --replace 'return local_share() / "locale"' 'return Path("${placeholder "out"}/share/locale")'
85 substituteInPlace src/grapejuice_common/features/settings.py \
86 --replace 'k_default_wine_home: "",' 'k_default_wine_home: "${wine}",'
90 mkdir -p "$out/share/icons" "$out/share/applications" "$out/share/mime/packages"
91 cp -r src/grapejuice_common/assets/desktop/* $out/share/applications/
92 cp -r src/grapejuice_common/assets/icons $out/share/
93 cp src/grapejuice_common/assets/mime_xml/*.xml $out/share/mime/packages/
95 # compile locales (*.po -> *.mo)
96 # from https://gitlab.com/brinkervii/grapejuice/-/blob/master/src/grapejuice_common/util/mo_util.py
97 LOCALE_DIR="$out/share/locale"
98 PO_DIR="src/grapejuice_common/assets/po"
99 LINGUAS_FILE="src/grapejuice_common/assets/po/LINGUAS"
101 for lang in $(<"$LINGUAS_FILE") # extract langs from LINGUAS_FILE
103 po_file="$PO_DIR/$lang.po"
104 mo_file_dir="$LOCALE_DIR/$lang/LC_MESSAGES"
106 mkdir -p $mo_file_dir
108 mo_file="$mo_file_dir/grapejuice.mo"
109 msgfmt $po_file -o $mo_file # msgfmt from gettext
116 pythonImportsCheck = [ "grapejuice" ];
119 homepage = "https://gitlab.com/brinkervii/grapejuice";
120 description = "Simple Wine+Roblox management tool";
121 license = licenses.gpl3Plus;
122 platforms = platforms.linux;
123 maintainers = with maintainers; [ artturin helium ];