pkgsStatic.wpa_supplicant: fix build

Static build has less features enabled, since full set pulls dependency
on system which does not support static build by design.

authored by Dmitry Bogatov and committed by Bjørn Forsman 249a3ba5 80db8054

+15 -4
+15 -4
pkgs/os-specific/linux/wpa_supplicant/default.nix
··· 1 1 { lib, stdenv, fetchurl, openssl, pkg-config, libnl 2 2 , nixosTests, wpa_supplicant_gui 3 - , dbusSupport ? true, dbus 3 + , dbusSupport ? !stdenv.hostPlatform.isStatic, dbus 4 4 , withReadline ? true, readline 5 - , withPcsclite ? true, pcsclite 5 + , withPcsclite ? !stdenv.hostPlatform.isStatic, pcsclite 6 6 , readOnlyModeSSIDs ? false 7 7 }: 8 8 ··· 73 73 CONFIG_CTRL_IFACE_DBUS=y 74 74 CONFIG_CTRL_IFACE_DBUS_NEW=y 75 75 CONFIG_CTRL_IFACE_DBUS_INTRO=y 76 + '' 77 + # Upstream uses conditionals based on ifdef, so opposite of =y is 78 + # not =n, as one may expect, but undefine. 79 + # 80 + # This config is sourced into makefile. 81 + + optionalString (!dbusSupport) '' 82 + undefine CONFIG_CTRL_IFACE_DBUS 83 + undefine CONFIG_CTRL_IFACE_DBUS_NEW 84 + undefine CONFIG_CTRL_IFACE_DBUS_INTRO 76 85 '' + (if withReadline then '' 77 86 CONFIG_READLINE=y 78 87 '' else '' ··· 104 113 mkdir -p $out/share/man/man5 $out/share/man/man8 105 114 cp -v "doc/docbook/"*.5 $out/share/man/man5/ 106 115 cp -v "doc/docbook/"*.8 $out/share/man/man8/ 107 - 116 + '' 117 + + lib.optionalString dbusSupport '' 108 118 mkdir -p $out/share/dbus-1/system.d $out/share/dbus-1/system-services $out/etc/systemd/system 109 119 cp -v "dbus/"*service $out/share/dbus-1/system-services 110 120 sed -e "s@/sbin/wpa_supplicant@$out&@" -i "$out/share/dbus-1/system-services/"* 111 121 cp -v dbus/dbus-wpa_supplicant.conf $out/share/dbus-1/system.d 112 122 cp -v "systemd/"*.service $out/etc/systemd/system 113 - 123 + '' 124 + + '' 114 125 rm $out/share/man/man8/wpa_priv.8 115 126 install -Dm444 wpa_supplicant.conf $out/share/doc/wpa_supplicant/wpa_supplicant.conf.example 116 127 '';