Hello! Thomas Danckaert <[email protected]> skribis:
> A remaining issue with kdeinit is, that it needs to run in an > environment with all the required environment variables (such as > QT_PLUGIN_PATH and QML2_IMPORT_PATH) for all possible KDE applications > it has to start (and any libraries they depend on), in order to find > dependencies at runtime, such as plugins and Qml modules. If a user > wants to run a KDE application which relies on kdeinit, but kdeinit is > already running without all the required environment vars, the > application will not find all the plugins or Qml modules it needs. > (In a conventional system, kde applications just need to know one > central directory where they will find all KDE plugins present on the > system) OK. > I don't know what would be a good solution. A “kde-master” package, > which has references to all packaged KDE applications (and some > libraries which provide plugins) as inputs, and just adds the required > paths to the user's profile (not very modular, but it could work)? > Could a kdeinit service could help with this in GuixSD (haven't really > looked at services yet)? Other options that come to mind: (1) make ‘QT_PLUGIN_PATH’ and ‘QML2_IMPORT_PATH’ search paths of ‘kinit’; or (2) add a “profile hook” that creates a file containing the search path, and patch kinit to honor that file somehow. Option 1 sounds better, but ‘QT_PLUGIN_PATH’ really belongs to Qt, not to kinit. Thoughts? > From ba729cd9a2bbbc98bd308702ded837cae5980281 Mon Sep 17 00:00:00 2001 > From: Thomas Danckaert <[email protected]> > Date: Tue, 6 Dec 2016 14:55:39 +0100 > Subject: [PATCH] gnu: kdbusaddons: Embed path to kdeinit5, avoid dependency > cycles. > > kdbusaddons needs to know the location of the kdeinit5 executable, > provided by kinit. kinit depends on kdbusaddons, so we add bootstrap > versions of all packages in the dependency chain from kinit to > kdbusaddons to avoid cyclic dependencies. > > * gnu/packages/kde-frameworks.scm (kinit-bootstrap, > kdbusaddons-bootstrap, kbookmarks-bootstrap, kglobalaccel-bootstrap, > kio-bootstrap, kservice-bootstrap, ktextwidgets-bootstrap, > kwallet-bootstrap, kxmlgui-bootstrap): New variables. > (kdbusaddons)[inputs]: Add kinit-bootstrap. > [source,arguments]: Add patch and substitution to embed > kinit-bootstrap's store path in the code. > * gnu/packages/patches/kdbusaddons-kinit-path.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. [...] > +;; This version of kdbusaddons does not use kinit as an input, and is used to > +;; build kinit-bootstrap, as well as bootstrap versions of all kinit > +;; dependencies which also rely on kdbusaddons. > +(define kdbusaddons-bootstrap > + (package > + (inherit kdbusaddons) > + (source (origin > + (inherit (package-source kdbusaddons)) > + (patches '()))) Since ‘kdbusaddons’ doesn’t have any patches, you can omit this ‘source’ field. > +(define kservice-bootstrap > + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) > kservice)) > + > +(define ktextwidgets-bootstrap > + ((package-input-rewriting `((,kservice . ,kservice-bootstrap))) > ktextwidgets)) > + > +(define kwallet-bootstrap > + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap) > + (,kservice . ,kservice-bootstrap))) kwallet)) > + > +(define kglobalaccel-bootstrap > + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap) > + (,kservice . ,kservice-bootstrap))) > kglobalaccel)) > + > +(define kxmlgui-bootstrap > + ((package-input-rewriting `((,kglobalaccel . ,kglobalaccel-bootstrap) > + (,ktextwidgets . ,ktextwidgets-bootstrap))) > kxmlgui)) > + > +(define kbookmarks-bootstrap > + ((package-input-rewriting `((,kxmlgui . ,kxmlgui-bootstrap))) kbookmarks)) > + > +(define kio-bootstrap > + ((package-input-rewriting `((,kservice . ,kservice-bootstrap) > + (,kxmlgui . ,kxmlgui-bootstrap) > + (,kbookmarks . ,kbookmarks-bootstrap) > + (,kdbusaddons . ,kdbusaddons-bootstrap) > + (,kwallet . ,kwallet-bootstrap) > + (,ktextwidgets . ,ktextwidgets-bootstrap))) > kio)) > + > +(define kinit-bootstrap > + ((package-input-rewriting `((,kio . ,kio-bootstrap) > + (,kservice . ,kservice-bootstrap) > + (,kbookmarks . ,kbookmarks-bootstrap) > + (,kxmlgui . ,kxmlgui-bootstrap))) kinit)) Isn’t it enough to do: (define kinit-bootstrap ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) kinit)) ? Remember that ‘package-input-rewriting’ replaces inputs recursively. You can check with ‘guix graph -e '(@ (gnu packages kde) kdeinit-bootstrap)'’ whether you’re really getting what you want. > diff --git a/gnu/packages/patches/kdbusaddons-kinit-path.patch > b/gnu/packages/patches/kdbusaddons-kinit-path.patch > new file mode 100644 > index 0000000..97c7319 > --- /dev/null > +++ b/gnu/packages/patches/kdbusaddons-kinit-path.patch > @@ -0,0 +1,15 @@ > +Add placeholder for kinit's store path. s/path/file name/ please. :-) In GNU “path” traditionally means “search path.” Thanks! Ludo’.
