wpa_supplicant: allow disabling pcsclite dependency (#128182)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
misuzu 2021-06-27 19:36:16 +03:00 committed by GitHub
parent 538bd1dd98
commit edba976506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl, fetchpatch, openssl, pkg-config, libnl
, dbus, readline ? null, pcsclite ? null
, withDbus ? true, dbus
, withReadline ? true, readline
, withPcsclite ? true, pcsclite
, readOnlyModeSSIDs ? false
}:
@ -87,16 +88,16 @@ stdenv.mkDerivation rec {
CONFIG_TDLS=y
CONFIG_BGSCAN_SIMPLE=y
CONFIG_BGSCAN_LEARN=y
'' + optionalString (pcsclite != null) ''
'' + optionalString withPcsclite ''
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_AKA_PRIME=y
CONFIG_PCSC=y
'' + optionalString (dbus != null) ''
'' + optionalString withDbus ''
CONFIG_CTRL_IFACE_DBUS=y
CONFIG_CTRL_IFACE_DBUS_NEW=y
CONFIG_CTRL_IFACE_DBUS_INTRO=y
'' + (if readline != null then ''
'' + (if withReadline then ''
CONFIG_READLINE=y
'' else ''
CONFIG_WPA_CLI_EDIT=y
@ -113,10 +114,13 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile --replace /usr/local $out
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE \
-I$(echo "${lib.getDev libnl}"/include/libnl*/) \
-I${lib.getDev pcsclite}/include/PCSC/"
${optionalString withPcsclite "-I${lib.getDev pcsclite}/include/PCSC/"}"
'';
buildInputs = [ openssl libnl dbus readline pcsclite ];
buildInputs = [ openssl libnl ]
++ optional withDbus dbus
++ optional withReadline readline
++ optional withPcsclite pcsclite;
nativeBuildInputs = [ pkg-config ];