12 stdenv.mkDerivation rec {
17 url = "https://w1.fi/releases/${pname}-${version}.tar.gz";
18 sha256 = "sha256-Kz+stjL9T2XjL0v4Kna0tyxQH5laT2LjMCGf567RdHo=";
21 nativeBuildInputs = [ pkg-config ];
22 buildInputs = [ libnl openssl sqlite ];
26 # Note: fetchurl seems to be unhappy with openwrt git
27 # server's URLs containing semicolons. Using the github mirror instead.
28 url = "https://raw.githubusercontent.com/openwrt/openwrt/eefed841b05c3cd4c65a78b50ce0934d879e6acf/package/network/services/hostapd/patches/300-noscan.patch";
29 sha256 = "08p5frxhpq1rp2nczkscapwwl8g9nc4fazhjpxic5bcbssc3sb00";
33 outputs = [ "out" "man" ];
35 # Based on hostapd's defconfig. Only differences are tracked.
37 # Use epoll(7) instead of select(2) on linux
44 # Integrated EAP server
47 CONFIG_EAP_AKA_PRIME=y
53 CONFIG_EAP_GPSK_SHA256=y
69 # TKIP is considered insecure and upstream support will be removed in the future
73 CONFIG_RADIUS_SERVER=y
75 CONFIG_DRIVER_MACSEC_LINUX=y
76 CONFIG_FULL_DYNAMIC_VLAN=y
93 '' + lib.optionalString (sqlite != null) ''
97 passAsFile = [ "extraConfig" ];
101 cp -v defconfig .config
102 cat $extraConfigPath >> .config
104 substituteInPlace Makefile --replace /usr/local $out
105 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
108 preInstall = "mkdir -p $out/bin";
110 install -vD hostapd.8 -t $man/share/man/man8
111 install -vD hostapd_cli.1 -t $man/share/man/man1
115 inherit (nixosTests) wpa_supplicant;
119 homepage = "https://w1.fi/hostapd/";
120 description = "User space daemon for access point and authentication servers";
121 license = licenses.bsd3;
122 maintainers = with maintainers; [ oddlama ];
123 platforms = platforms.linux;