lol

thc-hydra: 7.5 -> 8.2

+23 -11
+23 -11
pkgs/tools/security/thc-hydra/default.nix
··· 1 - { stdenv, fetchurl, pkgconfig, openssl, libidn, ncurses, pcre, libssh, postgresql92 }: 1 + { stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, libmysql, postgresql 2 + , withGUI ? false, makeWrapper, pkgconfig, gtk2 }: 2 3 3 - with stdenv.lib; 4 + let 5 + makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs); 4 6 5 - stdenv.mkDerivation rec { 7 + in stdenv.mkDerivation rec { 6 8 name = "thc-hydra-${version}"; 7 - version = "7.5"; 9 + version = "8.2"; 8 10 9 11 src = fetchurl { 10 12 url = "http://www.thc.org/releases/hydra-${version}.tar.gz"; 11 - sha256 = "1dhavbn2mcm6c2c1qw29ipbpmczax3vhhlxzwn49c8cq471yg4vj"; 13 + sha256 = "1i2a5glmrxdjr80gfppx6wgakflcpj3ksgng212fjzhxr9m4k24y"; 12 14 }; 13 15 14 16 preConfigure = '' 15 - substituteInPlace configure --replace "\$LIBDIRS" "${openssl.out}/lib ${pcre.out}/lib ${libssh.out}/lib ${postgresql92.lib}/lib" 16 - substituteInPlace configure --replace "\$INCDIRS" "${openssl.dev}/include ${pcre.dev}/include ${libssh.dev}/include ${postgresql92}/include" 17 + substituteInPlace configure \ 18 + --replace "\$LIBDIRS" "${makeDirs "lib" "lib" buildInputs}" \ 19 + --replace "\$INCDIRS" "${makeDirs "dev" "include" buildInputs}" \ 20 + --replace "/usr/include/math.h" "${stdenv.glibc.dev}/include/math.h" \ 21 + --replace "libcurses.so" "libncurses.so" \ 22 + --replace "-lcurses" "-lncurses" 17 23 ''; 18 24 19 - nativeBuildInputs = [ pkgconfig ]; 20 - buildInputs = [ openssl libidn ncurses pcre libssh ]; 25 + nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ]; 26 + buildInputs = [ zlib openssl ncurses libidn pcre libssh libmysql postgresql ] 27 + ++ lib.optional withGUI gtk2; 28 + 29 + postInstall = lib.optionalString withGUI '' 30 + wrapProgram $out/bin/xhydra \ 31 + --add-flags --hydra-path --add-flags "$out/bin/hydra" 32 + ''; 21 33 22 - meta = { 34 + meta = with stdenv.lib; { 23 35 description = "A very fast network logon cracker which support many different services"; 24 36 license = licenses.agpl3; 25 37 homepage = https://www.thc.org/thc-hydra/; 26 38 maintainers = with maintainers; [offline]; 27 - platforms = platforms.unix; 39 + platforms = platforms.linux; 28 40 }; 29 41 }