2016-07-29 11:36:37 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, libnl, openssl, sqlite ? null }:
|
2011-06-20 01:30:57 +02:00
|
|
|
|
2015-04-25 00:12:55 +02:00
|
|
|
with stdenv.lib;
|
2015-03-26 20:30:51 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2011-06-20 01:30:57 +02:00
|
|
|
name = "hostapd-${version}";
|
2016-07-22 02:44:17 +02:00
|
|
|
version = "2.5";
|
2011-06-20 01:30:57 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-09-16 23:06:51 +02:00
|
|
|
url = "http://hostap.epitest.fi/releases/${name}.tar.gz";
|
2016-07-22 02:44:17 +02:00
|
|
|
sha256 = "0jn77r39ysshkzihv5rjbdajqazci59v2yab4rn05my09najs9wf";
|
2011-06-20 01:30:57 +02:00
|
|
|
};
|
|
|
|
|
2016-07-29 11:36:37 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/voidlinux/void-packages/a7bcbc258ba9884bccde831c0ae2069cade99e41/srcpkgs/wpa_supplicant/patches/patch-src_crypto_tls_openssl_c";
|
|
|
|
sha256 = "1ifa2i54a7ijsha197dyldal3m4q5i05ih2sk15f5a5ybb6x7vmp";
|
|
|
|
addPrefixes = true;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2015-04-25 00:12:55 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libnl openssl sqlite ];
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
CONFIG_DRIVER_WIRED=y
|
|
|
|
CONFIG_LIBNL32=y
|
|
|
|
CONFIG_EAP_SIM=y
|
|
|
|
CONFIG_EAP_AKA=y
|
|
|
|
CONFIG_EAP_AKA_PRIME=y
|
|
|
|
CONFIG_EAP_PAX=y
|
|
|
|
CONFIG_EAP_PWD=y
|
|
|
|
CONFIG_EAP_SAKE=y
|
|
|
|
CONFIG_EAP_GPSK=y
|
|
|
|
CONFIG_EAP_GPSK_SHA256=y
|
|
|
|
CONFIG_EAP_FAST=y
|
|
|
|
CONFIG_EAP_IKEV2=y
|
|
|
|
CONFIG_EAP_TNC=y
|
|
|
|
CONFIG_EAP_EKE=y
|
|
|
|
CONFIG_RADIUS_SERVER=y
|
|
|
|
CONFIG_IEEE80211R=y
|
|
|
|
CONFIG_IEEE80211N=y
|
|
|
|
CONFIG_IEEE80211AC=y
|
|
|
|
CONFIG_FULL_DYNAMIC_VLAN=y
|
|
|
|
CONFIG_VLAN_NETLINK=y
|
|
|
|
CONFIG_TLS=openssl
|
|
|
|
CONFIG_TLSV11=y
|
|
|
|
CONFIG_TLSV12=y
|
|
|
|
CONFIG_INTERNETWORKING=y
|
|
|
|
CONFIG_HS20=y
|
|
|
|
CONFIG_ACS=y
|
|
|
|
'' + optionalString (sqlite != null) ''
|
|
|
|
CONFIG_SQLITE=y
|
|
|
|
'';
|
2011-06-20 01:30:57 +02:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
cd hostapd
|
2015-04-25 00:12:55 +02:00
|
|
|
cp -v defconfig .config
|
|
|
|
echo "$extraConfig" >> .config
|
|
|
|
cat -n .config
|
|
|
|
substituteInPlace Makefile --replace /usr/local $out
|
2012-09-07 15:04:47 +02:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
|
2011-06-20 01:30:57 +02:00
|
|
|
'';
|
2015-03-26 20:30:51 +01:00
|
|
|
|
2011-06-20 01:30:57 +02:00
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
|
|
|
2015-04-25 00:12:55 +02:00
|
|
|
meta = {
|
2013-09-16 23:06:51 +02:00
|
|
|
homepage = http://hostap.epitest.fi;
|
2014-04-03 06:03:42 +02:00
|
|
|
repositories.git = git://w1.fi/hostap.git;
|
2011-06-20 01:30:57 +02:00
|
|
|
description = "A user space daemon for access point and authentication servers";
|
|
|
|
license = licenses.gpl2;
|
2015-04-25 00:12:55 +02:00
|
|
|
maintainers = with maintainers; [ phreedom wkennington ];
|
2011-06-20 01:30:57 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2013-03-11 10:31:51 +01:00
|
|
|
}
|