forked from mirrors/nixpkgs
Sync with dbus changes in nixpkgs
svn path=/nixos/trunk/; revision=28832
This commit is contained in:
parent
abfdab0d3e
commit
42a03ef0eb
1 changed files with 6 additions and 8 deletions
|
@ -8,8 +8,6 @@ let
|
||||||
|
|
||||||
cfg = config.services.dbus;
|
cfg = config.services.dbus;
|
||||||
|
|
||||||
inherit (pkgs) dbus;
|
|
||||||
|
|
||||||
homeDir = "/var/run/dbus";
|
homeDir = "/var/run/dbus";
|
||||||
|
|
||||||
configDir = pkgs.stdenv.mkDerivation {
|
configDir = pkgs.stdenv.mkDerivation {
|
||||||
|
@ -17,7 +15,7 @@ let
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
ensureDir $out
|
ensureDir $out
|
||||||
|
|
||||||
cp -v ${dbus}/etc/dbus-1/system.conf $out/system.conf
|
cp -v ${pkgs.dbus_daemon}/etc/dbus-1/system.conf $out/system.conf
|
||||||
|
|
||||||
# !!! Hm, these `sed' calls are rather error-prone...
|
# !!! Hm, these `sed' calls are rather error-prone...
|
||||||
|
|
||||||
|
@ -32,7 +30,7 @@ let
|
||||||
-e 's|<standard_system_servicedirs/>|${systemServiceDirs}|' \
|
-e 's|<standard_system_servicedirs/>|${systemServiceDirs}|' \
|
||||||
-e 's|<includedir>system.d</includedir>|${systemIncludeDirs}|'
|
-e 's|<includedir>system.d</includedir>|${systemIncludeDirs}|'
|
||||||
|
|
||||||
cp ${dbus}/etc/dbus-1/session.conf $out/session.conf
|
cp ${pkgs.dbus_daemon}/etc/dbus-1/session.conf $out/session.conf
|
||||||
|
|
||||||
# Add the services and session.d directories to the session bus
|
# Add the services and session.d directories to the session bus
|
||||||
# search path.
|
# search path.
|
||||||
|
@ -97,7 +95,7 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ dbus.daemon dbus.tools ];
|
environment.systemPackages = [ pkgs.dbus_daemon pkgs.dbus_tools ];
|
||||||
|
|
||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ source = configDir;
|
{ source = configDir;
|
||||||
|
@ -126,14 +124,14 @@ in
|
||||||
chown messagebus ${homeDir}
|
chown messagebus ${homeDir}
|
||||||
|
|
||||||
mkdir -m 0755 -p /var/lib/dbus
|
mkdir -m 0755 -p /var/lib/dbus
|
||||||
${dbus.tools}/bin/dbus-uuidgen --ensure
|
${pkgs.dbus_tools}/bin/dbus-uuidgen --ensure
|
||||||
|
|
||||||
rm -f ${homeDir}/pid
|
rm -f ${homeDir}/pid
|
||||||
'';
|
'';
|
||||||
|
|
||||||
daemonType = "fork";
|
daemonType = "fork";
|
||||||
|
|
||||||
exec = "${dbus}/bin/dbus-daemon --system";
|
exec = "${pkgs.dbus_daemon}/bin/dbus-daemon --system";
|
||||||
|
|
||||||
postStop =
|
postStop =
|
||||||
''
|
''
|
||||||
|
@ -148,7 +146,7 @@ in
|
||||||
|
|
||||||
security.setuidOwners = singleton
|
security.setuidOwners = singleton
|
||||||
{ program = "dbus-daemon-launch-helper";
|
{ program = "dbus-daemon-launch-helper";
|
||||||
source = "${dbus}/libexec/dbus-daemon-launch-helper";
|
source = "${pkgs.dbus_daemon}/libexec/dbus-daemon-launch-helper";
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "messagebus";
|
group = "messagebus";
|
||||||
setuid = true;
|
setuid = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue