diff --git a/default.nix b/default.nix index dd1ae82..07746da 100644 --- a/default.nix +++ b/default.nix @@ -26,7 +26,11 @@ stdenv.mkDerivation rec { # steam ]; - patchPhase = '' + patches = [ + ./dont-write-desktop-entry-during-runtime.patch + ]; + + postPatch = '' sed -i \ -e 's|/usr/bin/zenity|${pkgs.gnome.zenity}/bin/zenity|' \ -e 's|2>/dev/null||' \ diff --git a/dont-write-desktop-entry-during-runtime.patch b/dont-write-desktop-entry-during-runtime.patch new file mode 100644 index 0000000..417efbd --- /dev/null +++ b/dont-write-desktop-entry-during-runtime.patch @@ -0,0 +1,15 @@ +diff --git a/dzgui.sh b/dzgui.sh +index d8a895b..0c6c002 100755 +--- a/dzgui.sh ++++ b/dzgui.sh +@@ -222,10 +222,6 @@ freedesktop_dirs(){ + for i in dzgui grid.png hero.png logo.png; do + curl -s "$img_url/$i" > "$sd_install_path/$i" + done +- write_desktop_file > "$freedesktop_path/dzgui.desktop" +- if [[ $is_steam_deck -eq 1 ]]; then +- write_desktop_file > "$HOME/Desktop/dzgui.desktop" +- fi + } + find_library_folder(){ + steam_path=$(python3 $helpers_path/vdf2json.py -i $default_steam_path/steamapps/libraryfolders.vdf | jq -r '.libraryfolders[]|select(.apps|has("221100")).path')