mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 14:07:01 +01:00
gnu: flatpak: Add patch to fix paths.
* gnu/packages/package-management.scm (flatpak)[source]: Add patch. * gnu/packages/patches/flatpak-fix-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
d407c107f3
commit
9c4244cc73
3 changed files with 32 additions and 1 deletions
|
@ -1063,6 +1063,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/findutils-localstatedir.patch \
|
||||
%D%/packages/patches/findutils-test-rwlock-threads.patch \
|
||||
%D%/packages/patches/flann-cmake-3.11.patch \
|
||||
%D%/packages/patches/flatpak-fix-path.patch \
|
||||
%D%/packages/patches/foobillard++-pkg-config.patch \
|
||||
%D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \
|
||||
%D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \
|
||||
|
|
|
@ -1530,7 +1530,8 @@ (define-public flatpak
|
|||
(uri (string-append "https://github.com/flatpak/flatpak/releases/download/"
|
||||
version "/flatpak-" version ".tar.xz"))
|
||||
(sha256
|
||||
(base32 "0my82ijg1ipa4lwrvh88jlrxbabfqfz2ssfb8cn6k0pfgz53p293"))))
|
||||
(base32 "0my82ijg1ipa4lwrvh88jlrxbabfqfz2ssfb8cn6k0pfgz53p293"))
|
||||
(patches (search-patches "flatpak-fix-path.patch"))))
|
||||
|
||||
;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
|
||||
;; find the TLS backend in glib-networking.
|
||||
|
|
29
gnu/packages/patches/flatpak-fix-path.patch
Normal file
29
gnu/packages/patches/flatpak-fix-path.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
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…
Reference in a new issue