nixpkgs/pkgs/os-specific/linux/hostapd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
2.2 KiB
Nix
Raw Normal View History

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