mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
* dbus-tools: purity fix (don't try to create /var).
svn path=/nixpkgs/trunk/; revision=13638
This commit is contained in:
parent
6a83330e8b
commit
6211cf4c0c
1 changed files with 16 additions and 4 deletions
|
@ -1,16 +1,24 @@
|
|||
args: with args;
|
||||
{stdenv, fetchurl, pkgconfig, expat, libX11, libICE, libSM, useX11 ? true}:
|
||||
|
||||
let
|
||||
version = "1.2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
||||
sha256 = "1f7v79ws34mh6j75fk6w4w9v441vffll0fwf5vk94mwa0bc28g5b";
|
||||
};
|
||||
|
||||
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
|
||||
|
@ -19,21 +27,25 @@ in rec {
|
|||
|
||||
tools = stdenv.mkDerivation {
|
||||
name = "dbus-tools-" + version;
|
||||
|
||||
inherit src configureFlags;
|
||||
|
||||
buildInputs = [pkgconfig expat libs]
|
||||
++ (if useX11 then [libX11 libICE libSM] else []);
|
||||
++ 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
|
||||
sed -i '/mkdir.*localstate/d' tools/Makefile.in
|
||||
substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:'
|
||||
'';
|
||||
};
|
||||
|
||||
# I'm too lazy to separate daemon and libs now.
|
||||
# I'm too lazy to separate daemon and libs now.
|
||||
daemon = libs;
|
||||
|
||||
# FIXME TODO
|
||||
|
|
Loading…
Reference in a new issue