2012-09-07 15:04:47 +02:00
|
|
|
{ stdenv, fetchurl, libnl, openssl, pkgconfig }:
|
2011-06-20 01:30:57 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "hostapd-${version}";
|
2012-09-07 15:04:47 +02:00
|
|
|
version = "1.0";
|
2011-06-20 01:30:57 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-09-07 15:04:47 +02:00
|
|
|
url = "http://w1.fi/releases/${name}.tar.gz";
|
|
|
|
sha256 = "1k6z2g0g324593a7ybd76bywvj0gnf9cybqaj2sq5ks6gv5rsbh0";
|
2011-06-20 01:30:57 +02:00
|
|
|
};
|
|
|
|
|
2012-09-07 15:04:47 +02:00
|
|
|
buildInputs = [ libnl openssl pkgconfig ];
|
2011-06-20 01:30:57 +02:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
cd hostapd
|
2012-09-07 15:04:47 +02:00
|
|
|
substituteInPlace Makefile --replace "/usr/local/bin" "$out/bin"
|
2011-06-20 01:30:57 +02:00
|
|
|
mv defconfig .config
|
2012-09-07 15:04:47 +02:00
|
|
|
echo CONFIG_LIBNL32=y | tee -a .config
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
|
2011-06-20 01:30:57 +02:00
|
|
|
'';
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://w1.fi/hostapd/;
|
|
|
|
description = "A user space daemon for access point and authentication servers";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.phreedom ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|