D-Bus splitted into two packages: dbus.libs and dbus.tools
svn path=/nixpkgs/branches/stdenv-updates/; revision=10461
This commit is contained in:
@@ -1,22 +1,38 @@
|
||||
{stdenv, fetchurl, pkgconfig, expat}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "dbus-1.0.2";
|
||||
args: with args;
|
||||
let
|
||||
version = "1.0.2";
|
||||
src = fetchurl {
|
||||
url = http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz;
|
||||
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
||||
sha256 = "1jn652zb81mczsx4rdcwrrzj3lfhx9d107zjfnasc4l5yljl204a";
|
||||
};
|
||||
buildInputs = [pkgconfig expat];
|
||||
configureFlags = "--without-x --localstatedir=/var";
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
# Awful hack: `make install' wants to write in /var, but it
|
||||
# can't. So redirect it with a DESTDIR.
|
||||
preInstall = "
|
||||
installFlagsArray=(DESTDIR=$out/destdir)
|
||||
";
|
||||
tools = stdenv.mkDerivation {
|
||||
name = "dbus-tools-" + version;
|
||||
inherit src configureFlags;
|
||||
buildInputs = [pkgconfig expat libs]
|
||||
++ if useX11 then [libX11 libICE libSM] else [];
|
||||
postConfigure = "cd tools";
|
||||
|
||||
postInstall = "
|
||||
mv $out/destdir/$out/* $out
|
||||
rm -rf $out/destdir
|
||||
";
|
||||
NIX_LDFLAGS = "-ldbus-1";
|
||||
makeFlags = "DBUS_DAEMONDIR=${daemon}/bin";
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in
|
||||
sed -i '/mkdir.*localstate/d' tools/Makefile.in
|
||||
'';
|
||||
};
|
||||
|
||||
# I'm too lazy to separate daemon and libs now.
|
||||
daemon = libs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user