anbox: ensure .desktop files use a correct `anbox`

This fixes two issues

- store path is hardcoded in desktop files
- `.anbox-wrapped` is used in desktop files

authored by Samuel Dionne-Riel and committed by rnhmjoj e8a39314 11aa36c6

+36
+34
pkgs/os-specific/linux/anbox/0001-NixOS-Use-anbox-from-PATH-in-desktop-files.patch
··· 1 + From cb61e856c4357d9787f7a2313bacb1c3b2133d36 Mon Sep 17 00:00:00 2001 2 + From: Samuel Dionne-Riel <samuel@dionne-riel.com> 3 + Date: Fri, 4 Jun 2021 19:05:53 -0400 4 + Subject: [PATCH] [NixOS] Use `anbox` from PATH in desktop files 5 + 6 + --- 7 + src/anbox/application/launcher_storage.cpp | 6 ++---- 8 + 1 file changed, 2 insertions(+), 4 deletions(-) 9 + 10 + diff --git a/src/anbox/application/launcher_storage.cpp b/src/anbox/application/launcher_storage.cpp 11 + index d5053cf..a4be719 100644 12 + --- a/src/anbox/application/launcher_storage.cpp 13 + +++ b/src/anbox/application/launcher_storage.cpp 14 + @@ -69,9 +69,7 @@ void LauncherStorage::add_or_update(const Database::Item &item) { 15 + auto package_name = item.package; 16 + std::replace(package_name.begin(), package_name.end(), '.', '-'); 17 + 18 + - auto exe_path = utils::process_get_exe_path(getpid()); 19 + - if (utils::get_env_value("SNAP").length() > 0) 20 + - exe_path = snap_exe_path; 21 + + auto exe_path = "anbox"; 22 + 23 + std::string exec = utils::string_format("%s launch ", exe_path); 24 + 25 + @@ -121,4 +119,4 @@ void LauncherStorage::remove(const Database::Item &item) { 26 + fs::remove(item_icon_path); 27 + } 28 + 29 + -} 30 + \ No newline at end of file 31 + +} 32 + -- 33 + 2.29.2 34 +
+2
pkgs/os-specific/linux/anbox/default.nix
··· 123 123 url = "https://git.alpinelinux.org/aports/plain/community/anbox/give-more-time-to-start.patch?id=058b56d4b332ef3379551b343bf31e0f2004321a"; 124 124 sha256 = "0iiz3c7fgfgl0dvx8sf5hv7a961xqnihwpz6j8r0ib9v8piwxh9a"; 125 125 }) 126 + # Ensures generated desktop files work on store path change 127 + ./0001-NixOS-Use-anbox-from-PATH-in-desktop-files.patch 126 128 ]; 127 129 128 130 postInstall = ''