2008-02-02 20:41:06 +00:00
|
|
|
args: with args;
|
2008-03-04 13:30:34 +00:00
|
|
|
|
2008-02-02 20:41:06 +00:00
|
|
|
let
|
2008-03-04 13:30:34 +00:00
|
|
|
|
|
|
|
version = "1.1.20";
|
|
|
|
|
2007-03-04 21:28:24 +00:00
|
|
|
src = fetchurl {
|
2008-02-02 20:41:06 +00:00
|
|
|
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
2008-03-04 13:30:34 +00:00
|
|
|
sha256 = "0zhl6cxlwfm9hsl7vm8ycif39805zsa1z8f0qnbfh54jmwccl7vg";
|
2007-03-04 21:28:24 +00:00
|
|
|
};
|
2008-03-04 13:30:34 +00:00
|
|
|
|
2008-02-02 20:41:06 +00:00
|
|
|
configureFlags = "--disable-static --localstatedir=/var --with-session-socket-dir=/tmp";
|
2008-03-04 13:30:34 +00:00
|
|
|
|
2008-02-02 20:41:06 +00:00
|
|
|
in rec {
|
2008-03-04 13:30:34 +00:00
|
|
|
|
2008-02-02 20:41:06 +00:00
|
|
|
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 20:42:36 +00:00
|
|
|
++ (if useX11 then [libX11 libICE libSM] else []);
|
2008-02-02 20:41:06 +00:00
|
|
|
postConfigure = "cd tools";
|
2007-06-05 16:56:10 +00:00
|
|
|
|
2008-02-02 20:41:06 +00:00
|
|
|
NIX_LDFLAGS = "-ldbus-1";
|
|
|
|
makeFlags = "DBUS_DAEMONDIR=${daemon}/bin";
|
|
|
|
|
|
|
|
patchPhase = ''
|
2008-03-05 14:37:06 +00:00
|
|
|
substituteInPlace tools/Makefile.in --replace 'test -z "$(localstatelibdir)"' true
|
2008-02-02 20:41:06 +00:00
|
|
|
sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in
|
|
|
|
'';
|
|
|
|
};
|
2007-06-05 16:56:10 +00:00
|
|
|
|
2008-03-04 13:30:34 +00:00
|
|
|
# I'm too lazy to separate daemon and libs now.
|
2008-02-02 20:41:06 +00:00
|
|
|
daemon = libs;
|
2008-02-08 10:39:20 +00:00
|
|
|
|
|
|
|
# FIXME TODO
|
|
|
|
# After merger it will be better to correct upstart-job instead.
|
|
|
|
outPath = daemon.outPath;
|
2008-03-04 13:30:34 +00:00
|
|
|
|
2007-03-04 21:28:24 +00:00
|
|
|
}
|