2017-02-02 02:43:45 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libnl, openssl, sqlite ? null }:
|
2011-06-20 00:30:57 +01:00
|
|
|
|
2019-06-26 07:16:44 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2011-06-20 00:30:57 +01:00
|
|
|
name = "hostapd-${version}";
|
2019-04-21 17:06:03 +01:00
|
|
|
version = "2.8";
|
2011-06-20 00:30:57 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-16 12:15:26 +01:00
|
|
|
url = "https://w1.fi/releases/${name}.tar.gz";
|
2019-04-21 17:06:03 +01:00
|
|
|
sha256 = "1c74rrazkhy4lr7pwgwa2igzca7h9l4brrs7672kiv7fwqmm57wj";
|
2011-06-20 00:30:57 +01:00
|
|
|
};
|
|
|
|
|
2015-04-24 23:12:55 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libnl openssl sqlite ];
|
|
|
|
|
2019-06-26 07:16:44 +01:00
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
|
|
|
# Note: fetchurl seems to be unhappy with openwrt git
|
|
|
|
# server's URLs containing semicolons. Using the github mirror instead.
|
|
|
|
url = "https://raw.githubusercontent.com/openwrt/openwrt/master/package/network/services/hostapd/patches/300-noscan.patch";
|
|
|
|
sha256 = "04wg4yjc19wmwk6gia067z99gzzk9jacnwxh5wyia7k5wg71yj5k";})
|
|
|
|
];
|
2019-06-23 20:33:14 +01:00
|
|
|
|
2018-05-22 10:01:01 +01:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2015-04-24 23:12:55 +01:00
|
|
|
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
|
2019-06-26 08:26:29 +01:00
|
|
|
'' + stdenv.lib.optionalString (sqlite != null) ''
|
2015-04-24 23:12:55 +01:00
|
|
|
CONFIG_SQLITE=y
|
|
|
|
'';
|
2011-06-20 00:30:57 +01:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
cd hostapd
|
2015-04-24 23:12:55 +01:00
|
|
|
cp -v defconfig .config
|
|
|
|
echo "$extraConfig" >> .config
|
|
|
|
cat -n .config
|
|
|
|
substituteInPlace Makefile --replace /usr/local $out
|
2012-09-07 14:04:47 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
|
2011-06-20 00:30:57 +01:00
|
|
|
'';
|
2015-03-26 19:30:51 +00:00
|
|
|
|
2011-06-20 00:30:57 +01:00
|
|
|
preInstall = "mkdir -p $out/bin";
|
2018-05-22 10:01:01 +01:00
|
|
|
postInstall = ''
|
|
|
|
install -vD hostapd.8 -t $man/share/man/man8
|
|
|
|
install -vD hostapd_cli.1 -t $man/share/man/man1
|
|
|
|
'';
|
2011-06-20 00:30:57 +01:00
|
|
|
|
2019-06-26 08:26:29 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-09-16 22:06:51 +01:00
|
|
|
homepage = http://hostap.epitest.fi;
|
2014-04-03 05:03:42 +01:00
|
|
|
repositories.git = git://w1.fi/hostap.git;
|
2011-06-20 00:30:57 +01:00
|
|
|
description = "A user space daemon for access point and authentication servers";
|
|
|
|
license = licenses.gpl2;
|
2019-06-23 20:33:14 +01:00
|
|
|
maintainers = with maintainers; [ phreedom ninjatrappeur ];
|
2011-06-20 00:30:57 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2013-03-11 09:31:51 +00:00
|
|
|
}
|