mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: flatpak: Fix binary path when exporting application files.
* gnu/packages/package-management.scm (flatpak): Use FLATPAK_BINARY environment variable instead of patch. [native-search-paths]: Add FLATPAK_BINARY. [source]<patches>: Remove "flatpak-fix-path.patch". * gnu/packages/patches/flatpak-fix-path.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Fixes: #438 Change-Id: I094234b1ecf9b2bba6d499a0eae4559231a2f199 Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
This commit is contained in:
parent
69a77ffab2
commit
47dba6b269
3 changed files with 7 additions and 31 deletions
|
@ -1303,7 +1303,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/firebird-riscv64-support-pt1.patch \
|
%D%/packages/patches/firebird-riscv64-support-pt1.patch \
|
||||||
%D%/packages/patches/firebird-riscv64-support-pt2.patch \
|
%D%/packages/patches/firebird-riscv64-support-pt2.patch \
|
||||||
%D%/packages/patches/flann-cmake-3.11.patch \
|
%D%/packages/patches/flann-cmake-3.11.patch \
|
||||||
%D%/packages/patches/flatpak-fix-path.patch \
|
|
||||||
%D%/packages/patches/flatpak-fix-fonts-icons.patch \
|
%D%/packages/patches/flatpak-fix-fonts-icons.patch \
|
||||||
%D%/packages/patches/flatpak-fix-icon-validation.patch \
|
%D%/packages/patches/flatpak-fix-icon-validation.patch \
|
||||||
%D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \
|
%D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \
|
||||||
|
|
|
@ -2096,7 +2096,6 @@ the boot loader configuration.")
|
||||||
(base32 "0ajbz8ms4h5nyjr59hv9z8vaimj4f3p51v8idmy14qnbmmjwa2nb"))
|
(base32 "0ajbz8ms4h5nyjr59hv9z8vaimj4f3p51v8idmy14qnbmmjwa2nb"))
|
||||||
(patches
|
(patches
|
||||||
(search-patches "flatpak-fix-fonts-icons.patch"
|
(search-patches "flatpak-fix-fonts-icons.patch"
|
||||||
"flatpak-fix-path.patch"
|
|
||||||
"flatpak-fix-icon-validation.patch"
|
"flatpak-fix-icon-validation.patch"
|
||||||
"flatpak-unset-gdk-pixbuf-for-sandbox.patch"))))
|
"flatpak-unset-gdk-pixbuf-for-sandbox.patch"))))
|
||||||
(build-system meson-build-system)
|
(build-system meson-build-system)
|
||||||
|
@ -2214,6 +2213,13 @@ cp -r /tmp/locale/*/en_US.*")))
|
||||||
libarchive
|
libarchive
|
||||||
libseccomp
|
libseccomp
|
||||||
libxau))
|
libxau))
|
||||||
|
(native-search-paths
|
||||||
|
(list (search-path-specification
|
||||||
|
(variable "FLATPAK_BINARY")
|
||||||
|
(separator #f)
|
||||||
|
(files '("bin"))
|
||||||
|
(file-pattern "^flatpak$")
|
||||||
|
(file-type 'regular))))
|
||||||
(home-page "https://flatpak.org")
|
(home-page "https://flatpak.org")
|
||||||
(synopsis "System for building, distributing, and running sandboxed desktop
|
(synopsis "System for building, distributing, and running sandboxed desktop
|
||||||
applications")
|
applications")
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
Flatpak writes files for installed applications with the full Flatpak (store) path. This patch makes it write just "flatpak", using Flatpak from PATH. This is similar to the NixOS [0] patch, updated for Flatpak 1.12.1
|
|
||||||
|
|
||||||
[0] https://github.com/NixOS/nixpkgs/blob/bf4167861d0f864b0fc457778d54feb4a2675ea2/pkgs/development/libraries/flatpak/use-flatpak-from-path.patch
|
|
||||||
|
|
||||||
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
|
|
||||||
index 80ff5e5f..0c111c31 100644
|
|
||||||
--- a/common/flatpak-dir.c
|
|
||||||
+++ b/common/flatpak-dir.c
|
|
||||||
@@ -7134,8 +7134,7 @@ export_desktop_file (const char *app,
|
|
||||||
flatpak = FLATPAK_BINDIR "/flatpak";
|
|
||||||
|
|
||||||
g_string_append_printf (new_exec,
|
|
||||||
- "%s run --branch=%s --arch=%s",
|
|
||||||
- flatpak,
|
|
||||||
+ "flatpak run --branch=%s --arch=%s",
|
|
||||||
escaped_branch,
|
|
||||||
escaped_arch);
|
|
||||||
|
|
||||||
@@ -8467,8 +8466,8 @@ flatpak_dir_deploy (FlatpakDir *self,
|
|
||||||
if ((flatpak = g_getenv ("FLATPAK_BINARY")) == NULL)
|
|
||||||
flatpak = FLATPAK_BINDIR "/flatpak";
|
|
||||||
|
|
||||||
- bin_data = g_strdup_printf ("#!/bin/sh\nexec %s run --branch=%s --arch=%s %s \"$@\"\n",
|
|
||||||
- flatpak, escaped_branch, escaped_arch, escaped_app);
|
|
||||||
+ bin_data = g_strdup_printf ("#!/bin/sh\nexec flatpak run --branch=%s --arch=%s %s \"$@\"\n",
|
|
||||||
+ escaped_branch, escaped_arch, escaped_app);
|
|
||||||
if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE,
|
|
||||||
G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error))
|
|
||||||
return FALSE;
|
|
Loading…
Add table
Add a link
Reference in a new issue