aboutsummaryrefslogtreecommitdiff
modify from https://github.com/NixOS/nixpkgs/pull/262462

diff --git a/common/flatpak-run.c b/common/flatpak-run.c
index 94ad013..5c9f55e 100644
--- a/common/flatpak-run.c
+++ b/common/flatpak-run.c
@@ -871,6 +871,49 @@ out:
   return res;
 }
 
+static void
+get_gnu_closure (GHashTable *closure, const gchar *source_path)
+{
+  if (g_file_test (source_path, G_FILE_TEST_IS_SYMLINK))
+    {
+      g_autofree gchar *path = g_malloc(PATH_MAX);
+      realpath(source_path, path);
+      if (g_str_has_prefix(path, "/gnu/store/"))
+        {
+          *strchr(path + strlen("/gnu/store/"), '/') = 0;
+          g_hash_table_add(closure, g_steal_pointer (&path));
+        }
+    }
+  else if (g_file_test (source_path, G_FILE_TEST_IS_DIR))
+    {
+      g_autoptr(GDir) dir = g_dir_open(source_path, 0, NULL);
+      const gchar *file_name;
+      while ((file_name = g_dir_read_name(dir)))
+        {
+          g_autofree gchar *path = g_build_filename (source_path, file_name, NULL);
+          get_gnu_closure (closure, path);
+        }
+    }
+}
+
+static void
+add_gnu_store_symlink_targets (FlatpakBwrap *bwrap, const gchar *source_path)
+{
+  GHashTable *closure = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+  get_gnu_closure(closure, source_path);
+
+  GHashTableIter iter;
+  gpointer path;
+  g_hash_table_iter_init(&iter, closure);
+  while (g_hash_table_iter_next(&iter, &path, NULL))
+    {
+      flatpak_bwrap_add_args (bwrap, "--ro-bind", path, path, NULL);
+    }
+
+  g_hash_table_destroy(closure);
+}
+
 static void
 add_font_path_args (FlatpakBwrap *bwrap)
 {
@@ -898,6 +946,18 @@ add_font_path_args (FlatpakBwrap *bwrap)
                               "\t<remap-dir as-path=\"%s\">/run/host/fonts</remap-dir>\n",
                               SYSTEM_FONTS_DIR);
     }
+  else if (g_file_test ("/run/current-system/profile/share/fonts", G_FILE_TEST_EXISTS))
+    {
+      add_gnu_store_symlink_targets (bwrap, "/run/current-system/profile/share/fonts");
+      flatpak_bwrap_add_args (bwrap,
+                              "--ro-bind",
+                              "/run/current-system/profile/share/fonts",
+                              "/run/host/fonts",
+                              NULL);
+      g_string_append_printf (xml_snippet,
+                              "\t<remap-dir as-path=\"%s\">/run/host/fonts</remap-dir>\n",
+                              "/run/current-system/profile/share/fonts");
+    }
 
   if (g_file_test ("/usr/local/share/fonts", G_FILE_TEST_EXISTS))
     {
@@ -998,6 +1058,13 @@ add_icon_path_args (FlatpakBwrap *bwrap)
                               "--ro-bind", "/usr/share/icons", "/run/host/share/icons",
                               NULL);
     }
+  else if (g_file_test ("/run/current-system/profile/share/icons", G_FILE_TEST_IS_DIR))
+    {
+      add_gnu_store_symlink_targets (bwrap, "/run/current-system/profile/share/icons");
+      flatpak_bwrap_add_args (bwrap,
+                              "--ro-bind", "/run/current-system/profile/share/icons", "/run/host/share/icons",
+                              NULL);
+    }
 
   user_icons_path = g_build_filename (g_get_user_data_dir (), "icons", NULL);
   user_icons = g_file_new_for_path (user_icons_path);
e, kmag, kmousetool, kmouth, sweeper): Update to 20.04.1. [source](uri): Adjust for new upstream location. * gnu/packages/kde.scm (baloo-widgets, libkomparediff2, kqtquickcharts, grantleetheme, kcachegrind, libkdegames, zeroconf-ioslave): Update to 20.04.1. [source](uri): Adjust for new upstream location. (grantleetheme)[inputs]: Add KGUIADDONS. * gnu/packages/kde-pim.scm (akonadi, akonadi-calendar, akonadi-contacts, akonadi-mime, akonadi-notes, akonadi-search, kincidenceeditor, kaddressbook, kalarmcal, kblog, kcalendarsupport, kcalutils, kdav, kdepim-apps-libs, kdepim-runtime, keventviews, kgpg, kidentitymanagement, kimap, kldap, kleopatra, kmail, kmailcommon, kmailimporter, kmailtransport, kmbox, kmessagelib, kmime, knotes, kontactinterface, korganizer, kpimcommon, kpimtextedit, ksmtp, ktnef, libkdepim, libkgapi, libkleo, libksieve): Update to 20.04.1. [source](uri): Adjust to current. (akonadi)[inputs]: Remove KDBUSADDONS and KDESIGNERPLUGIN. (akonadi-calendar)[inputs]: Remove KDBUSADDONS. (kdepim-runtime)[source](patches): Remove. [arguments]: Add phase 'extend-CPLUS_INCLUDE_PATH'. [inputs]: Remove KDBUSADDONS and KICONTHEMES. (kmessagelib)[arguments]: Add phase 'extend-CPLUS_INCLUDE_PATH. [inputs]: Add QCA. (kdepim-apps-libs)[inputs]: Remove KDBUSADDONS and KICONTHEMES. (knotes)[inputs]: Remove KDBUSADDONS. (kpimcommon)[inputs]: Remove KDBUSADDONS and KCOMPLETION. (libksieve)[arguments]: Disable one more test. (korganizer)[arguments]: Disable one test. Marius Bakke 2020-04-12gnu: elisa: Fix grammar of "allows to browse" to "browses"....* gnu/packages/kde-multimedia (elisa): Fix grammar. Vagrant Cascadian 2020-03-08gnu: Reword and extend descriptions for some KDE packages....* gnu/packages/kde-multimedia.scm (libkcompatdisc)[description]: Extend. * gnu/packages/kde-pim.scm (akonadi-search, kalarmcal, kdemailimporter, kdepim-apps-libs, kidentitymanagement, kldap, kmailtransport, kmbox, kmime, kontactinterface, kpimtextedit)[description]: Reword and extend. (ktnef, kpimcommon, libkdepim)[synopsis, description]: Reword and extend. (kmailtransport)[synopsis]: Fix space. * gnu/packages/kde-systemtools.scm (khelpcenter)[description]: Extend. Hartmut Goebel 2019-12-26gnu: Add ffmpegthumbs....* gnu/packages/kde-multimedia.scm (ffmpegthumbs): New variable. Hartmut Goebel 2019-12-26gnu: Add audiocd-kio....* gnu/packages/kde-multimedia.scm (audiocd-kio): New variable. Hartmut Goebel 2019-12-26gnu: Add libkcompactdisc....* gnu/packages/kde-multimedia.scm (libkcompactdisc): New variable. Hartmut Goebel 2019-12-26gnu: Add kamoso....* gnu/packages/kde-multimedia.scm (kamoso): New variable. Hartmut Goebel 2019-12-26gnu: Add elisa....* gnu/packages/kde-multimedia.scm (elisa): New variable. Hartmut Goebel 2019-12-26gnu: Add kwave....* gnu/packages/kde-multimedia.scm (kwave): New variable. Hartmut Goebel 2019-12-26gnu: Add kmplayer....`guix lint` reports two CVEs, both are unrelated: - CVE-2018-5200: for vendor "pandora" and some 4.2.2.x version - CVE-2019-9133: windows only (I assume it it alsow relates to the "pandora" vendor, since the version the CVE refers to as "solving the issue" does not exist at KDE.) * gnu/packages/kde-multimedia.scm (kmplayer): New variable. * gnu/packages/patches/kmplayer-aarch64.patch, gnu/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch: New files. * gnu/local.mk: Add them. Hartmut Goebel 2019-12-26gnu: Add kmix....* gnu/packages/kde-multimedia.scm (kmix): New variable. Hartmut Goebel 2019-12-26gnu: Add kaffeine....* gnu/packages/kde-multimedia.scm (kaffeine): New variable. Hartmut Goebel 2019-12-26gnu: Add libkcddb....* gnu/packages/kde-multimedia.scm (libkcddb): New variable. Hartmut Goebel 2019-12-26gnu: Add k3b....* gnu/packages/kde-multimedia.scm (k3b): New variable. Hartmut Goebel 2019-12-26gnu: Add juk....* gnu/packages/kde-multimedia.scm (juk): New variable. Hartmut Goebel 2019-12-26gnu: Add dragon....* gnu/packages/kde-multimedia.scm: New file. * gnu/lokal.mk (MODULES): Add it. Hartmut Goebel