2017-02-20 00:54:19 +01:00
|
|
|
{ runCommand, writeText, libxslt, dbus
|
|
|
|
, serviceDirectories ? []
|
|
|
|
, suidHelper ? "/var/setuid-wrappers/dbus-daemon-launch-helper"
|
|
|
|
}:
|
2017-02-16 12:55:38 +01:00
|
|
|
|
|
|
|
/* DBus has two configuration parsers -- normal and "trivial", which is used
|
|
|
|
* for suid helper. Unfortunately the latter doesn't support <include>
|
|
|
|
* directive. That means that we can't just place our configuration to
|
|
|
|
* *-local.conf -- it needs to be in the main configuration file.
|
|
|
|
*/
|
|
|
|
runCommand "dbus-1"
|
|
|
|
{
|
|
|
|
inherit serviceDirectories suidHelper;
|
2017-11-12 04:52:21 +01:00
|
|
|
preferLocalBuild = true;
|
2017-02-20 00:54:19 +01:00
|
|
|
XML_CATALOG_FILES = writeText "dbus-catalog.xml" ''
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE catalog PUBLIC
|
|
|
|
"-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
|
|
|
|
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
|
|
|
|
|
|
|
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
|
|
|
<rewriteSystem
|
|
|
|
systemIdStartString="http://www.freedesktop.org/standards/dbus/1.0/"
|
2017-02-20 03:16:26 +01:00
|
|
|
rewritePrefix="file://${dbus}/share/xml/dbus/"/>
|
2017-02-20 00:54:19 +01:00
|
|
|
</catalog>
|
|
|
|
'';
|
2017-02-16 12:55:38 +01:00
|
|
|
}
|
|
|
|
''
|
|
|
|
mkdir -p $out
|
|
|
|
|
2017-02-20 03:09:41 +01:00
|
|
|
${libxslt.bin}/bin/xsltproc --nonet \
|
2017-02-16 12:55:38 +01:00
|
|
|
--stringparam serviceDirectories "$serviceDirectories" \
|
|
|
|
--stringparam suidHelper "$suidHelper" \
|
|
|
|
${./make-system-conf.xsl} ${dbus}/share/dbus-1/system.conf \
|
|
|
|
> $out/system.conf
|
2017-02-20 03:09:41 +01:00
|
|
|
${libxslt.bin}/bin/xsltproc --nonet \
|
2017-02-16 12:55:38 +01:00
|
|
|
--stringparam serviceDirectories "$serviceDirectories" \
|
|
|
|
${./make-session-conf.xsl} ${dbus}/share/dbus-1/session.conf \
|
|
|
|
> $out/session.conf
|
|
|
|
''
|