Skip to content

Commit

Permalink
lomiri.lomiri-session: Force xdg-user-dirs-update to be run
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
OPNA2608 committed Dec 16, 2024
1 parent 7f323c6 commit 4577f71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/desktops/lomiri/data/lomiri-session/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
makeWrapper,
pkg-config,
systemd,
xdg-user-dirs,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
Expand All @@ -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 = [
Expand Down

0 comments on commit 4577f71

Please sign in to comment.