git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #69210 from peterhoeg/u/hydra

thc-hydra: 8.5 -> 9.0

commit844555626a1aad3eced4945b68d70148d8f2357c authorPeter Hoeg <peter@hoeg.com> dateWed 25 Sep 2019, 05:33 (7 years ago) parent0de5df0a1c0e10
1 file changed+23−16
pkgs/tools/security/thc-hydra/default.nix+23−16
pkgs/tools/security/thc-hydra/default.nix+23−16
@@ -1,30 +1,37 @@
1−{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, mysql, postgresql
1+{ stdenv, lib, fetchFromGitHub, zlib, openssl, ncurses, libidn, pcre, libssh, mysql, postgresql
22, withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
33
4−let
5− makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs);
6−
7−in stdenv.mkDerivation rec {
4+stdenv.mkDerivation rec {
85 pname = "thc-hydra";
9− version = "8.5";
6+ version = "9.0";
107
11− src = fetchurl {
12− url = "http://www.thc.org/releases/hydra-${version}.tar.gz";
13− sha256 = "0vfx6xwmw0r7nd0s232y7rckcj58fc1iqjgp4s56rakpz22b4yjm";
8+ src = fetchFromGitHub {
9+ owner = "vanhauser-thc";
10+ repo = "thc-hydra";
11+ rev = "v${version}";
12+ sha256 = "09d2f55wky1iabnl871d4r6dyyvr8zhp47d9j1p6d0pvdv93kl4z";
1413 };
1514
16− preConfigure = ''
15+ postPatch = let
16+ makeDirs = output: subDir: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) buildInputs);
17+ in ''
1718 substituteInPlace configure \
18− --replace "\$LIBDIRS" "${makeDirs "lib" "lib" buildInputs}" \
19− --replace "\$INCDIRS" "${makeDirs "dev" "include" buildInputs}" \
19+ --replace '$LIBDIRS' "${makeDirs "lib" "lib"}" \
20+ --replace '$INCDIRS' "${makeDirs "dev" "include"}" \
2021 --replace "/usr/include/math.h" "${lib.getDev stdenv.cc.libc}/include/math.h" \
2122 --replace "libcurses.so" "libncurses.so" \
2223 --replace "-lcurses" "-lncurses"
2324 '';
2425
2526 nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
26− buildInputs = [ zlib openssl ncurses libidn pcre libssh mysql.connector-c postgresql ]
27− ++ lib.optional withGUI gtk2;
27+
28+ buildInputs = [
29+ zlib openssl ncurses libidn pcre libssh mysql.connector-c postgresql
30+ ] ++ lib.optional withGUI gtk2;
31+
32+ enableParallelBuilding = true;
33+
34+ DATADIR = "/share/${pname}";
2835
2936 postInstall = lib.optionalString withGUI ''
3037 wrapProgram $out/bin/xhydra \
@@ -33,9 +40,9 @@ in stdenv.mkDerivation rec {
3340
3441 meta = with stdenv.lib; {
3542 description = "A very fast network logon cracker which support many different services";
43+ homepage = "https://www.thc.org/thc-hydra/";
3644 license = licenses.agpl3;
37− homepage = https://www.thc.org/thc-hydra/;
38− maintainers = with maintainers; [offline];
45+ maintainers = with maintainers; [ offline ];
3946 platforms = platforms.linux;
4047 };
4148}