commit
844555626a
|
@ -1,30 +1,37 @@
|
||||||
{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, mysql, postgresql
|
{ stdenv, lib, fetchFromGitHub, zlib, openssl, ncurses, libidn, pcre, libssh, mysql, postgresql
|
||||||
, withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
|
, withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs);
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
pname = "thc-hydra";
|
pname = "thc-hydra";
|
||||||
version = "8.5";
|
version = "9.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "http://www.thc.org/releases/hydra-${version}.tar.gz";
|
owner = "vanhauser-thc";
|
||||||
sha256 = "0vfx6xwmw0r7nd0s232y7rckcj58fc1iqjgp4s56rakpz22b4yjm";
|
repo = "thc-hydra";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "09d2f55wky1iabnl871d4r6dyyvr8zhp47d9j1p6d0pvdv93kl4z";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
postPatch = let
|
||||||
|
makeDirs = output: subDir: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) buildInputs);
|
||||||
|
in ''
|
||||||
substituteInPlace configure \
|
substituteInPlace configure \
|
||||||
--replace "\$LIBDIRS" "${makeDirs "lib" "lib" buildInputs}" \
|
--replace '$LIBDIRS' "${makeDirs "lib" "lib"}" \
|
||||||
--replace "\$INCDIRS" "${makeDirs "dev" "include" buildInputs}" \
|
--replace '$INCDIRS' "${makeDirs "dev" "include"}" \
|
||||||
--replace "/usr/include/math.h" "${lib.getDev stdenv.cc.libc}/include/math.h" \
|
--replace "/usr/include/math.h" "${lib.getDev stdenv.cc.libc}/include/math.h" \
|
||||||
--replace "libcurses.so" "libncurses.so" \
|
--replace "libcurses.so" "libncurses.so" \
|
||||||
--replace "-lcurses" "-lncurses"
|
--replace "-lcurses" "-lncurses"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
|
nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
|
||||||
buildInputs = [ zlib openssl ncurses libidn pcre libssh mysql.connector-c postgresql ]
|
|
||||||
++ lib.optional withGUI gtk2;
|
buildInputs = [
|
||||||
|
zlib openssl ncurses libidn pcre libssh mysql.connector-c postgresql
|
||||||
|
] ++ lib.optional withGUI gtk2;
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
DATADIR = "/share/${pname}";
|
||||||
|
|
||||||
postInstall = lib.optionalString withGUI ''
|
postInstall = lib.optionalString withGUI ''
|
||||||
wrapProgram $out/bin/xhydra \
|
wrapProgram $out/bin/xhydra \
|
||||||
|
@ -33,9 +40,9 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A very fast network logon cracker which support many different services";
|
description = "A very fast network logon cracker which support many different services";
|
||||||
|
homepage = "https://www.thc.org/thc-hydra/";
|
||||||
license = licenses.agpl3;
|
license = licenses.agpl3;
|
||||||
homepage = https://www.thc.org/thc-hydra/;
|
maintainers = with maintainers; [ offline ];
|
||||||
maintainers = with maintainers; [offline];
|
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue