summary refs log tree commit diff
path: root/pkgs/os-specific/linux/wpa_supplicant/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/wpa_supplicant/default.nix')
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix
index 656fa477768..d1821e4a2ae 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/default.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix
@@ -98,6 +98,16 @@ stdenv.mkDerivation rec {
     CONFIG_CTRL_IFACE_DBUS=y
     CONFIG_CTRL_IFACE_DBUS_NEW=y
     CONFIG_CTRL_IFACE_DBUS_INTRO=y
+  ''
+    # Upstream uses conditionals based on ifdef, so opposite of =y is
+    # not =n, as one may expect, but undefine. People, why don't you
+    # just use KBuild and stop reinventing the wheel?
+    #
+    # This config is sourced into makefile.
+    + optionalString (!withDbus) ''
+    undefine CONFIG_CTRL_IFACE_DBUS
+    undefine CONFIG_CTRL_IFACE_DBUS_NEW
+    undefine CONFIG_CTRL_IFACE_DBUS_INTRO
   '' + (if withReadline then ''
     CONFIG_READLINE=y
   '' else ''