nixpkgs-suyu/pkgs/tools/networking/reaver-wps/default.nix

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

48 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, libpcap, sqlite, makeWrapper }:
2013-04-26 15:06:20 +02:00
stdenv.mkDerivation rec {
version = "1.4";
pname = "reaver-wps";
confdir = "/var/db/${pname}-${version}"; # the sqlite database is at "${confdir}/reaver/reaver.db"
2013-04-26 15:06:20 +02:00
src = fetchurl {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/reaver-wps/reaver-${version}.tar.gz";
2013-04-26 15:06:20 +02:00
sha256 = "0bdjai4p8xbsw8zdkkk43rgsif79x0nyx4djpyv0mzh59850blxd";
};
nativeBuildInputs = [ makeWrapper ];
2013-04-26 15:06:20 +02:00
buildInputs = [ libpcap sqlite ];
# Workaround build failure on -fno-common toolchains:
# ld: crypto/dh_groups.o:src/crypto/../globule.h:141: multiple definition of
# `globule'; /build/ccrzO6vA.o:src/globule.h:141: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
setSourceRoot = ''
sourceRoot=$(echo */src)
'';
2018-07-25 23:44:21 +02:00
configureFlags = [ "--sysconfdir=${confdir}" ];
installPhase = ''
mkdir -p $out/{bin,etc}
cp reaver.db $out/etc/
cp reaver wash $out/bin/
2013-04-26 15:06:20 +02:00
wrapProgram $out/bin/reaver --run "[ -s ${confdir}/reaver/reaver.db ] || install -D $out/etc/reaver.db ${confdir}/reaver/reaver.db"
wrapProgram $out/bin/wash --run "[ -s ${confdir}/reaver/reaver.db ] || install -D $out/etc/reaver.db ${confdir}/reaver/reaver.db"
2013-04-26 15:06:20 +02:00
'';
enableParallelBuilding = true;
patches = [ ./parallel-build.patch ];
meta = with lib; {
2013-04-26 15:06:20 +02:00
description = "Brute force attack against Wifi Protected Setup";
homepage = "https://code.google.com/archive/p/reaver-wps/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ nico202 ];
2013-04-26 15:06:20 +02:00
};
}