2008-02-02 21:41:06 +01:00
|
|
|
args: with args;
|
|
|
|
let
|
2008-12-02 13:27:27 +01:00
|
|
|
version = "1.2.4";
|
2007-03-04 22:28:24 +01:00
|
|
|
src = fetchurl {
|
2008-02-02 21:41:06 +01:00
|
|
|
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
2008-12-02 13:27:27 +01:00
|
|
|
sha256 = "1f7v79ws34mh6j75fk6w4w9v441vffll0fwf5vk94mwa0bc28g5b";
|
2007-03-04 22:28:24 +01:00
|
|
|
};
|
2008-02-02 21:41:06 +01:00
|
|
|
configureFlags = "--disable-static --localstatedir=/var --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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
tools = stdenv.mkDerivation {
|
|
|
|
name = "dbus-tools-" + version;
|
|
|
|
inherit src configureFlags;
|
|
|
|
buildInputs = [pkgconfig expat libs]
|
2008-02-02 21:42:36 +01:00
|
|
|
++ (if useX11 then [libX11 libICE libSM] else []);
|
2008-02-02 21:41:06 +01:00
|
|
|
postConfigure = "cd tools";
|
2007-06-05 18:56:10 +02:00
|
|
|
|
2008-02-02 21:41:06 +01:00
|
|
|
NIX_LDFLAGS = "-ldbus-1";
|
|
|
|
makeFlags = "DBUS_DAEMONDIR=${daemon}/bin";
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in
|
2008-03-06 14:02:04 +01:00
|
|
|
sed -i '/mkdir.*localstate/d' tools/Makefile.in
|
2008-02-02 21:41:06 +01:00
|
|
|
'';
|
|
|
|
};
|
2007-06-05 18:56:10 +02:00
|
|
|
|
2008-03-06 14:02:04 +01:00
|
|
|
# I'm too lazy to separate daemon and libs now.
|
2008-02-02 21:41:06 +01:00
|
|
|
daemon = libs;
|
2008-02-08 11:39:20 +01:00
|
|
|
|
|
|
|
# FIXME TODO
|
|
|
|
# After merger it will be better to correct upstart-job instead.
|
|
|
|
outPath = daemon.outPath;
|
2007-03-04 22:28:24 +01:00
|
|
|
}
|