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

33 lines
991 B
Nix
Raw Normal View History

2012-09-07 17:04:47 +04:00
{ stdenv, fetchurl, libnl, openssl, pkgconfig }:
stdenv.mkDerivation rec {
name = "hostapd-${version}";
2014-04-03 08:03:42 +04:00
version = "2.1";
src = fetchurl {
2013-09-17 01:06:51 +04:00
url = "http://hostap.epitest.fi/releases/${name}.tar.gz";
2014-04-03 08:03:42 +04:00
sha256 = "121gpcs1ws7m2v8jk091jhmz3pm2xmhwkv96gqkyb4k0bgsi0waw";
};
2012-09-07 17:04:47 +04:00
buildInputs = [ libnl openssl pkgconfig ];
configurePhase = ''
cd hostapd
2012-09-07 17:04:47 +04:00
substituteInPlace Makefile --replace "/usr/local/bin" "$out/bin"
mv defconfig .config
2012-09-07 17:04:47 +04:00
echo CONFIG_LIBNL32=y | tee -a .config
2013-03-11 13:31:51 +04:00
echo CONFIG_IEEE80211N=y | tee -a .config
2012-09-07 17:04:47 +04:00
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
'';
preInstall = "mkdir -p $out/bin";
meta = with stdenv.lib; {
2013-09-17 01:06:51 +04:00
homepage = http://hostap.epitest.fi;
2014-04-03 08:03:42 +04:00
repositories.git = git://w1.fi/hostap.git;
description = "A user space daemon for access point and authentication servers";
license = licenses.gpl2;
maintainers = [ maintainers.phreedom ];
platforms = platforms.linux;
};
2013-03-11 13:31:51 +04:00
}