1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:48:57 +00:00
nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl
Nikolay Amiantov 3e23ec4450 makeDBusConf: init
Use XSLT transform to modify stock dbus configuration file. This is needed
because some dbus components doesn't support <include> so we need to put our
core configuration in the main file.
2017-02-16 15:41:23 +03:00

31 lines
1 KiB
XML

<?xml version="1.0"?>
<!--
This script copies the original system.conf from the dbus
distribution, but sets paths from $serviceDirectories parameter
and suid helper from $suidHelper parameter.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings"
extension-element-prefixes="str"
>
<xsl:output method='xml' encoding="UTF-8" doctype-system="busconfig.dtd" />
<xsl:param name="serviceDirectories" />
<xsl:template match="/busconfig">
<busconfig>
<xsl:copy-of select="child::node()[name() != 'include' and name() != 'standard_session_servicedirs' and name() != 'servicedir' and name() != 'includedir']" />
<xsl:for-each select="str:tokenize($serviceDirectories)">
<servicedir><xsl:value-of select="." />/share/dbus-1/services</servicedir>
<includedir><xsl:value-of select="." />/etc/dbus-1/session.d</includedir>
</xsl:for-each>
</busconfig>
</xsl:template>
</xsl:stylesheet>