Commit Graph

8 Commits

Author SHA1 Message Date
Alois Wohlschlager
efd23ff1c8
nixos/gdk-pixbuf: move GDK_PIXBUF_MODULE_FILE to sessionVariables
Some environments do not load /etc/profile, so environment.variables do
not work. In particular, this is the case for Plasma Wayland.

Use environment.sessionVariables for setting that variable instead,
which is handled by PAM and hence more reliable.
2023-03-18 20:19:01 +01:00
Jan Tojnar
c789af6065 gnome._gdkPixbufCacheBuilder_DO_NOT_USE: Extract from nixos/gdk-pixbuf
Unlike previously, we now fail loudly when a package not containing a gdk-pixbuf modules is passed.
2022-10-21 10:06:24 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Matthew Bauer
c33e8c4986 nixos/gdk-pixbuf.nix: don’t set GDK_PIXBUF_MODULE_FILE in cross
From 6c5983a291, this should not be
necessary for gdk-pixbuf to work correctly.
2020-05-07 14:39:42 -05:00
Matthew Bauer
6c5983a291 gdk-pixbuf: make target env hook
Unfortunately, we need to emulate the system to get a real cache.
Native version doesn’t know the right paths.
2020-04-06 16:36:22 -04:00
worldofpeace
b1bc0645ea gdk-pixbuf: rename from gdk_pixbuf 2019-07-22 18:50:57 -04:00
Symphorien Gibol
a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
Ambroz Bizjak
d9fa88dfe8 Use a NixOS module for generating the gdk-pixbuf loaders cache.
Fixes issue #33231 and makes it possible to enable Plasma and KDE at the same time.

Previously, this worked like this:
- The gdk-pixbuf package comes with a cache file covering the modules bundled
  with gdk-pixbuf.
- The librsvg package comes with a cache covering modules from gdk-pixbuf as
  well as librsvg.
- plasma5 and xfce modules set the environment variable GDK_PIXBUF_MODULE_FILE
  to the one from librsvg, so that SVG was supported in addition to the
  formats supported by gdk-pixbuf. However if both were enabled a configuration
  conflict would result (despite setting to the same value).

While this sort of worked (ignoring the conflict which perhaps could be hacked
around), it is unscalable and a hack, as there would be a real problem when one
wanted to add a third package that supports additional image formats.

A new NixOS module (gdk-pixbuf) is added with a configuration option
(modulePackages) that other modules use to request specific packages to be
included in the loaders cache. When any package is present in the list, the
module generates a system-wide loaders cache which includes the requested
packages (and always gdk-pixbuf itself), and sets the environment variable
GDK_PIXBUF_MODULE_FILE to point to the generated cache file.

The plasma5 and xfce modules are updated to add librsvg to modulePackages
instead of setting GDK_PIXBUF_MODULE_FILE.

Note that many packages create wrappers that set GDK_PIXBUF_MODULE_FILE,
some directly to the one from librsvg. Therefore this change does not
change the existing hack in the librsvg package which ensures that
file is generated. This change aims only to solve the conflict in the
global environent variable configuration.
2018-06-25 16:23:45 +02:00