diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-08-16 21:44:07 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-08-16 21:44:07 +0000 |
commit | c2c7c18316b4db72c366813ec7bd5fef81580518 (patch) | |
tree | 04bc62fbbe042f52912ef02ce498f7fc884d34cc /pkgs/development/libraries/dbus | |
parent | 89fc3a896c2934bb182fdda4e25b9066dfcb8eec (diff) | |
download | nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.tar nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.tar.gz nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.tar.bz2 nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.tar.lz nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.tar.xz nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.tar.zst nixlib-c2c7c18316b4db72c366813ec7bd5fef81580518.zip |
* dbus: get the configuration from /etc/dbus-1. It's purer to use a
command-line argument when starting the system bus daemon, but unfortunately dbus-daemon-launch-helper is started with an empty environment and no way to override the compile-time location of the configuration file. I've made a temporary copy of dbus since lots of things depend on it and I don't want a big recompile. svn path=/nixpkgs/trunk/; revision=16735
Diffstat (limited to 'pkgs/development/libraries/dbus')
-rw-r--r-- | pkgs/development/libraries/dbus/temp.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/libraries/dbus/temp.nix b/pkgs/development/libraries/dbus/temp.nix new file mode 100644 index 000000000000..85314b725afd --- /dev/null +++ b/pkgs/development/libraries/dbus/temp.nix @@ -0,0 +1,58 @@ +{stdenv, fetchurl, pkgconfig, expat, libX11, libICE, libSM, useX11 ? true}: + +let + version = "1.2.16"; + + src = fetchurl { + url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; + sha256 = "1j742d22ablcgxfxa3hcwf5bq6bd1pba7fiwc3dvnjvcdb0k32ln"; + }; + + configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp"; + +in rec { + + libs = stdenv.mkDerivation { + name = "dbus-library-" + version; + + buildInputs = [pkgconfig expat]; + + inherit src configureFlags; + + patchPhase = + '' + sed -i '/mkinstalldirs.*localstatedir/d' bus/Makefile.in + sed -i '/SUBDIRS/s/ tools//' Makefile.in + ''; + + installFlags = "sysconfdir=$(out)/etc"; + }; + + tools = stdenv.mkDerivation { + name = "dbus-tools-" + version; + + inherit src configureFlags; + + buildInputs = [pkgconfig expat libs] + ++ stdenv.lib.optionals useX11 [libX11 libICE libSM]; + + postConfigure = "cd tools"; + + NIX_LDFLAGS = "-ldbus-1"; + + makeFlags = "DBUS_DAEMONDIR=${daemon}/bin"; + + patchPhase = + '' + sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in + substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:' + ''; + }; + + # I'm too lazy to separate daemon and libs now. + daemon = libs; + + # FIXME TODO + # After merger it will be better to correct upstart-job instead. + outPath = daemon.outPath; +} |