Specifying mailboxes as a list isn't a good approach since this makes it
impossible to override values. For backwards-compatibility, it's still
possible to declare a list of mailboxes, but a deprecation warning will
be shown.
Otherwise, things like hp-setup segfault if you run them from another
nixpkgs checkout:
```
HP Linux Imaging and Printing System (ver. 3.20.5)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[1] 4543 abort (core dumped) result/bin/hp-setup
```
Otherwise, things like `hp-setup` fail finding gi:
```
HP Linux Imaging and Printing System (ver. 3.20.5)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
Traceback (most recent call last):
File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/setup.py", line 314, in <module>
ui = import_module(ui_package + ".setupdialog")
File "/nix/store/n0b076p351ma864q38if4yglsg99hw2s-python3-3.8.3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/ui5/setupdialog.py", line 31, in <module>
from base import device, utils, models, pkit
File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/base/pkit.py", line 38, in <module>
from gi import _gobject as gobject
ModuleNotFoundError: No module named 'gi'
```
The `swiften` XMPP library was broken as of 2019. This commit
fixes it, by copying a patch from the Arch Linux PKGBUILD
(https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/swift)
and by using the same scons flags in that PKGBUILD.
Additionally, we use the SWIFTEN_INSTALLDIR env variable to actually
put something in the output.
Of note is the flag swiften_dll=1, which means that the library
is now built dynamically.