From 923f8de5365cbad6c007e812b51754d1a0eae8d4 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:49:40 +0400 Subject: [PATCH] aaaa --- hosts/sakotop/configuration.nix | 2 +- modules/desktop/game/grapejuice/default.nix | 2 +- packages/default.nix | 1 - packages/grapejuice.nix | 130 -------------------- 4 files changed, 2 insertions(+), 133 deletions(-) delete mode 100644 packages/grapejuice.nix diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index d577af89..9ba82946 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -44,7 +44,7 @@ wine.enable = true; lutris.enable = true; steam.enable = true; - grapejuice.enable = true; + grapejuice.enable = false; }; media = { gimp.enable = true; diff --git a/modules/desktop/game/grapejuice/default.nix b/modules/desktop/game/grapejuice/default.nix index d1dd5d97..2760cae2 100644 --- a/modules/desktop/game/grapejuice/default.nix +++ b/modules/desktop/game/grapejuice/default.nix @@ -9,8 +9,8 @@ in }; config = mkIf cfg.enable { + # TODO update package users.users.sako.packages = with pkgs; [ - sako.grapejuice ]; }; } diff --git a/packages/default.nix b/packages/default.nix index c9a53065..2aa2711e 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -4,5 +4,4 @@ # example = pkgs.callPackage ./example { }; sako.davinci-resolve = pkgs.callPackage ./davinci-resolve.nix {}; nullpomino = pkgs.callPackage ./nullpomino.nix {}; - sako.grapejuice = pkgs.callPackage ./grapejuice.nix {}; } diff --git a/packages/grapejuice.nix b/packages/grapejuice.nix deleted file mode 100644 index b32dd192..00000000 --- a/packages/grapejuice.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ lib -, fetchFromGitLab -, gobject-introspection -, pciutils -, python3Packages -, gtk3 -, wrapGAppsHook -, glib -, cairo -, desktop-file-utils -, xdg-utils -, xdg-user-dirs -, gettext -, winetricks -, wine -, glxinfo -, xrandr -}: - -python3Packages.buildPythonApplication rec { - pname = "grapejuice"; - version = "7.14.4"; - - src = fetchFromGitLab { - owner = "BrinkerVII"; - repo = "grapejuice"; - rev = "v${version}"; - sha256 = "sha256-CWTnofJXx9T/hGXx3rdephXHjpiVRdFEJQ1u2v6n7yo="; - }; - - nativeBuildInputs = [ - gobject-introspection - desktop-file-utils - glib - wrapGAppsHook - ]; - - buildInputs = [ - cairo - gettext - gtk3 - ]; - - propagatedBuildInputs = with python3Packages; [ - psutil - dbus-python - pygobject3 - packaging - wheel - setuptools - requests - unidecode - click - pydantic - ]; - - dontWrapGApps = true; - - makeWrapperArgs = [ - "\${gappsWrapperArgs[@]}" - "--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs wine winetricks pciutils glxinfo xrandr ]}" - # make xdg-open overrideable at runtime - "--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}" - ]; - - postPatch = '' - substituteInPlace src/grapejuice_common/assets/desktop/grapejuice.desktop \ - --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \ - --replace \$GRAPEJUICE_GUI_EXECUTABLE "$out/bin/grapejuice-gui" \ - --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" - - substituteInPlace src/grapejuice_common/paths.py \ - --replace 'return local_share() / "locale"' 'return Path("${placeholder "out"}/share/locale")' - - substituteInPlace src/grapejuice_common/models/settings_model.py \ - --replace 'default_wine_home: Optional[str] = ""' 'default_wine_home: Optional[str] = "${wine}"' - ''; - - postInstall = '' - mkdir -p "$out/share/icons" "$out/share/applications" "$out/share/mime/packages" "$out/bin" - cp -r src/grapejuice_common/assets/desktop/* $out/share/applications/ - cp -r src/grapejuice_packaging/packaging_resources/bin/* $out/bin - chmod +x $out/bin/* - cp -r src/grapejuice_common/assets/icons $out/share/ - cp src/grapejuice_common/assets/mime_xml/*.xml $out/share/mime/packages/ - - # compile locales (*.po -> *.mo) - # from https://gitlab.com/brinkervii/grapejuice/-/blob/master/src/grapejuice_common/util/mo_util.py - LOCALE_DIR="$out/share/locale" - PO_DIR="src/grapejuice_common/assets/po" - LINGUAS_FILE="src/grapejuice_common/assets/po/LINGUAS" - - for lang in $(<"$LINGUAS_FILE") # extract langs from LINGUAS_FILE - do - po_file="$PO_DIR/$lang.po" - mo_file_dir="$LOCALE_DIR/$lang/LC_MESSAGES" - - mkdir -p $mo_file_dir - - mo_file="$mo_file_dir/grapejuice.mo" - msgfmt $po_file -o $mo_file # msgfmt from gettext - done - ''; - - # 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 helium ]; - }; -} -