mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
ad24ab01de
*buildInputs take .dev outputs by default, but we don't need it here.
The extra dependency (introduced by commit d172061281
) was breaking
tests like nixosTests.containers-imperative and nixosTests.installer.*
https://hydra.nixos.org/eval/1767666#tabs-still-fail
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ runCommand
|
|
, writeText
|
|
, libxslt
|
|
, dbus
|
|
, findXMLCatalogs
|
|
, serviceDirectories ? []
|
|
, suidHelper ? "/var/setuid-wrappers/dbus-daemon-launch-helper"
|
|
, apparmor ? "disabled" # one of enabled, disabled, required
|
|
}:
|
|
|
|
/* 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 apparmor;
|
|
preferLocalBuild = true;
|
|
allowSubstitutes = false;
|
|
|
|
nativeBuildInputs = [
|
|
libxslt.bin
|
|
findXMLCatalogs
|
|
];
|
|
|
|
buildInputs = [
|
|
dbus.out
|
|
];
|
|
}
|
|
''
|
|
mkdir -p $out
|
|
|
|
xsltproc --nonet \
|
|
--stringparam serviceDirectories "$serviceDirectories" \
|
|
--stringparam suidHelper "$suidHelper" \
|
|
--stringparam apparmor "$apparmor" \
|
|
${./make-system-conf.xsl} ${dbus}/share/dbus-1/system.conf \
|
|
> $out/system.conf
|
|
xsltproc --nonet \
|
|
--stringparam serviceDirectories "$serviceDirectories" \
|
|
--stringparam apparmor "$apparmor" \
|
|
${./make-session-conf.xsl} ${dbus}/share/dbus-1/session.conf \
|
|
> $out/session.conf
|
|
''
|