hostapd: Refactoring
This commit is contained in:
parent
4ae59b199a
commit
076dff2f58
1 changed files with 41 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
{ stdenv, fetchurl, libnl, openssl, pkgconfig }:
|
||||
{ stdenv, fetchurl, pkgconfig, libnl, openssl, sqlite ? null }:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hostapd-${version}";
|
||||
version = "2.4";
|
||||
|
@ -9,25 +10,57 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0zv5pnfrp6z7jjbskzgdb2rlmlbvdxmmis7ca94x5jy9s5mypq3g";
|
||||
};
|
||||
|
||||
buildInputs = [ libnl openssl pkgconfig ];
|
||||
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
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cd hostapd
|
||||
substituteInPlace Makefile --replace "/usr/local/bin" "$out/bin"
|
||||
mv defconfig .config
|
||||
echo CONFIG_LIBNL32=y | tee -a .config
|
||||
echo CONFIG_IEEE80211N=y | tee -a .config
|
||||
cp -v defconfig .config
|
||||
echo "$extraConfig" >> .config
|
||||
cat -n .config
|
||||
substituteInPlace Makefile --replace /usr/local $out
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
|
||||
'';
|
||||
|
||||
preInstall = "mkdir -p $out/bin";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = {
|
||||
homepage = http://hostap.epitest.fi;
|
||||
repositories.git = git://w1.fi/hostap.git;
|
||||
description = "A user space daemon for access point and authentication servers";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.phreedom ];
|
||||
maintainers = with maintainers; [ phreedom wkennington ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue