tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
thc-hydra: 7.5 -> 8.2
Nikolay Amiantov
9 years ago
1d726ace
52629123
+23
-11
1 changed file
expand all
collapse all
unified
split
pkgs
tools
security
thc-hydra
default.nix
+23
-11
pkgs/tools/security/thc-hydra/default.nix
···
1
1
-
{ stdenv, fetchurl, pkgconfig, openssl, libidn, ncurses, pcre, libssh, postgresql92 }:
1
1
+
{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, libmysql, postgresql
2
2
+
, withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
2
3
3
3
-
with stdenv.lib;
4
4
+
let
5
5
+
makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs);
4
6
5
5
-
stdenv.mkDerivation rec {
7
7
+
in stdenv.mkDerivation rec {
6
8
name = "thc-hydra-${version}";
7
7
-
version = "7.5";
9
9
+
version = "8.2";
8
10
9
11
src = fetchurl {
10
12
url = "http://www.thc.org/releases/hydra-${version}.tar.gz";
11
11
-
sha256 = "1dhavbn2mcm6c2c1qw29ipbpmczax3vhhlxzwn49c8cq471yg4vj";
13
13
+
sha256 = "1i2a5glmrxdjr80gfppx6wgakflcpj3ksgng212fjzhxr9m4k24y";
12
14
};
13
15
14
16
preConfigure = ''
15
15
-
substituteInPlace configure --replace "\$LIBDIRS" "${openssl.out}/lib ${pcre.out}/lib ${libssh.out}/lib ${postgresql92.lib}/lib"
16
16
-
substituteInPlace configure --replace "\$INCDIRS" "${openssl.dev}/include ${pcre.dev}/include ${libssh.dev}/include ${postgresql92}/include"
17
17
+
substituteInPlace configure \
18
18
+
--replace "\$LIBDIRS" "${makeDirs "lib" "lib" buildInputs}" \
19
19
+
--replace "\$INCDIRS" "${makeDirs "dev" "include" buildInputs}" \
20
20
+
--replace "/usr/include/math.h" "${stdenv.glibc.dev}/include/math.h" \
21
21
+
--replace "libcurses.so" "libncurses.so" \
22
22
+
--replace "-lcurses" "-lncurses"
17
23
'';
18
24
19
19
-
nativeBuildInputs = [ pkgconfig ];
20
20
-
buildInputs = [ openssl libidn ncurses pcre libssh ];
25
25
+
nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
26
26
+
buildInputs = [ zlib openssl ncurses libidn pcre libssh libmysql postgresql ]
27
27
+
++ lib.optional withGUI gtk2;
28
28
+
29
29
+
postInstall = lib.optionalString withGUI ''
30
30
+
wrapProgram $out/bin/xhydra \
31
31
+
--add-flags --hydra-path --add-flags "$out/bin/hydra"
32
32
+
'';
21
33
22
22
-
meta = {
34
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
27
-
platforms = platforms.unix;
39
39
+
platforms = platforms.linux;
28
40
};
29
41
}