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 }: 2 3 - with stdenv.lib; 4 5 - stdenv.mkDerivation rec { 6 name = "thc-hydra-${version}"; 7 - version = "7.5"; 8 9 src = fetchurl { 10 url = "http://www.thc.org/releases/hydra-${version}.tar.gz"; 11 - sha256 = "1dhavbn2mcm6c2c1qw29ipbpmczax3vhhlxzwn49c8cq471yg4vj"; 12 }; 13 14 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 ''; 18 19 - nativeBuildInputs = [ pkgconfig ]; 20 - buildInputs = [ openssl libidn ncurses pcre libssh ]; 21 22 - meta = { 23 description = "A very fast network logon cracker which support many different services"; 24 license = licenses.agpl3; 25 homepage = https://www.thc.org/thc-hydra/; 26 maintainers = with maintainers; [offline]; 27 - platforms = platforms.unix; 28 }; 29 }
··· 1 + { stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, libmysql, postgresql 2 + , withGUI ? false, makeWrapper, pkgconfig, gtk2 }: 3 4 + let 5 + makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs); 6 7 + in stdenv.mkDerivation rec { 8 name = "thc-hydra-${version}"; 9 + version = "8.2"; 10 11 src = fetchurl { 12 url = "http://www.thc.org/releases/hydra-${version}.tar.gz"; 13 + sha256 = "1i2a5glmrxdjr80gfppx6wgakflcpj3ksgng212fjzhxr9m4k24y"; 14 }; 15 16 preConfigure = '' 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" 23 ''; 24 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 + ''; 33 34 + meta = with stdenv.lib; { 35 description = "A very fast network logon cracker which support many different services"; 36 license = licenses.agpl3; 37 homepage = https://www.thc.org/thc-hydra/; 38 maintainers = with maintainers; [offline]; 39 + platforms = platforms.linux; 40 }; 41 }