Merge pull request #31397 from nico202/reaver-upgrade

reaver-wps-t6x: 1.5.2 -> 1.6.3
This commit is contained in:
Orivej Desh 2017-11-08 19:27:24 +00:00 committed by GitHub
commit 27831cbd86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,33 +1,24 @@
{ stdenv, fetchFromGitHub, libpcap, sqlite, pixiewps, makeWrapper }:
{ stdenv, fetchFromGitHub, libpcap, pixiewps, makeWrapper }:
stdenv.mkDerivation rec {
version = "1.5.2";
version = "1.6.3";
name = "reaver-wps-t6x-${version}";
confdir = "/var/db/${name}"; # the sqlite database is at "${confdir}/reaver/reaver.db"
src = fetchFromGitHub {
owner = "t6x";
repo = "reaver-wps-fork-t6x";
rev = "v${version}";
sha256 = "0zhlms89ncqz1f1hc22yw9x1s837yv76f1zcjizhgn5h7vp17j4b";
sha256 = "1bccwp67q1q0h5m38gqxn9imq5rb75jbmv7fjr2n38v10jcga2pb";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ libpcap sqlite pixiewps ];
buildInputs = [ libpcap pixiewps ];
setSourceRoot = ''
sourceRoot=$(echo */src)
'';
configureFlags = "--sysconfdir=${confdir}";
preConfigure = "cd src";
installPhase = ''
mkdir -p $out/{bin,etc}
cp reaver.db $out/etc/
mkdir -p $out/bin
cp reaver wash $out/bin/
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"
'';
meta = with stdenv.lib; {