Commit 4b3bdd48 authored by OPNA2608's avatar OPNA2608
Browse files

lomiri.lomiri-session: Force xdg-user-dirs-update to be run

mediascanner2 expects xdg-user-dirs to be set up properly, otherwise its g_get_user_special_dir() calls fail.

Lomiri, by itself, doesn't seem to ensure this by default, so hack in a call of this.
parent 6fd46df8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
  makeWrapper,
  pkg-config,
  systemd,
  xdg-user-dirs,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
@@ -34,6 +35,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {

    substituteInPlace systemd/CMakeLists.txt \
      --replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})'

    # Inject a call to xdg-user-dirs-update, so when mediascanner2 launches, it can actually scan for files
    substituteInPlace desktop/dm-lomiri-session.in \
      --replace-fail '@CMAKE_INSTALL_FULL_LIBEXECDIR@/lomiri-session/run-systemd-session' '${lib.getExe' xdg-user-dirs "xdg-user-dirs-update"} && @CMAKE_INSTALL_FULL_LIBEXECDIR@/lomiri-session/run-systemd-session'
  '';

  nativeBuildInputs = [