dbus: rename useX11 option into x11Support, cleanup a bit

This commit is contained in:
Jan Malakhovski 2015-03-19 00:49:31 +00:00
parent eb22e54243
commit 380ee53fff
2 changed files with 8 additions and 4 deletions

View File

@ -27,6 +27,6 @@ with lib;
fonts.fontconfig.enable = false;
nixpkgs.config.packageOverrides = pkgs:
{ dbus = pkgs.dbus.override { useX11 = false; }; };
{ dbus = pkgs.dbus.override { x11Support = false; }; };
};
}

View File

@ -1,6 +1,10 @@
{ stdenv, fetchurl, pkgconfig, autoconf, automake, libtool
, expat, systemd, glib, dbus_glib, python
, libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }:
, libX11 ? null, libICE ? null, libSM ? null, x11Support ? (stdenv.isLinux || stdenv.isDarwin) }:
assert x11Support -> libX11 != null
&& libICE != null
&& libSM != null;
let
version = "1.8.16";
@ -8,7 +12,7 @@ let
inherit (stdenv) lib;
buildInputsX = lib.optionals useX11 [ libX11 libICE libSM ];
buildInputsX = lib.optionals x11Support [ libX11 libICE libSM ];
# also other parts than "libs" need this statically linked lib
makeInternalLib = "(cd dbus && make libdbus-internal.la)";
@ -57,7 +61,7 @@ let
"--sysconfdir=/etc"
"--with-session-socket-dir=/tmp"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
] ++ lib.optional (!useX11) "--without-x";
] ++ lib.optional (!x11Support) "--without-x";
enableParallelBuilding = true;