about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-09-25 18:52:30 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-09-25 19:21:46 -0400
commitc455adcc42f9b2b62376b9fee99a0c5004a52425 (patch)
tree8b489f54e79aa7710554a1a4f3c1e58cfe32890f /pkgs/tools/security
parenteab41878ac16a80b1189d5e4aeec5e037f6571db (diff)
parent96ac71d680fe8d07e51fa979b0818b9aae06e1ec (diff)
downloadnixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.tar
nixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.tar.gz
nixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.tar.bz2
nixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.tar.lz
nixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.tar.xz
nixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.tar.zst
nixlib-c455adcc42f9b2b62376b9fee99a0c5004a52425.zip
Merge branch 'master' into staging-next
Fixes eval on darwin after #69072

Resolved conflict in pkgs/tools/security/thc-hydra/default.nix
Basically had to revert a1c0e10564f9a6281e14d7a7279b8589521e2c48 which
adapts #69210 to master that doesn't yet have
329a88efa78126ae7413807ce58000eab49e82d9

Tested using maintainers/scripts/eval-release.sh before and after to see
that the fix works
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/thc-hydra/default.nix39
1 files changed, 23 insertions, 16 deletions
diff --git a/pkgs/tools/security/thc-hydra/default.nix b/pkgs/tools/security/thc-hydra/default.nix
index 57deaaf0498c..aa36901e46b9 100644
--- a/pkgs/tools/security/thc-hydra/default.nix
+++ b/pkgs/tools/security/thc-hydra/default.nix
@@ -1,30 +1,37 @@
-{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, libmysqlclient, postgresql
+{ stdenv, lib, fetchFromGitHub, zlib, openssl, ncurses, libidn, pcre, libssh, libmysqlclient, postgresql
 , withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
 
-let
-  makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs);
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "thc-hydra";
-  version = "8.5";
+  version = "9.0";
 
-  src = fetchurl {
-    url = "http://www.thc.org/releases/hydra-${version}.tar.gz";
-    sha256 = "0vfx6xwmw0r7nd0s232y7rckcj58fc1iqjgp4s56rakpz22b4yjm";
+  src = fetchFromGitHub {
+    owner = "vanhauser-thc";
+    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 \
-      --replace "\$LIBDIRS" "${makeDirs "lib" "lib" buildInputs}" \
-      --replace "\$INCDIRS" "${makeDirs "dev" "include" buildInputs}" \
+      --replace '$LIBDIRS' "${makeDirs "lib" "lib"}" \
+      --replace '$INCDIRS' "${makeDirs "dev" "include"}" \
       --replace "/usr/include/math.h" "${lib.getDev stdenv.cc.libc}/include/math.h" \
       --replace "libcurses.so" "libncurses.so" \
       --replace "-lcurses" "-lncurses"
   '';
 
   nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
-  buildInputs = [ zlib openssl ncurses libidn pcre libssh libmysqlclient postgresql ]
-                ++ lib.optional withGUI gtk2;
+
+  buildInputs = [
+    zlib openssl ncurses libidn pcre libssh libmysqlclient postgresql
+  ] ++ lib.optional withGUI gtk2;
+
+  enableParallelBuilding = true;
+
+  DATADIR = "/share/${pname}";
 
   postInstall = lib.optionalString withGUI ''
     wrapProgram $out/bin/xhydra \
@@ -33,9 +40,9 @@ in stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "A very fast network logon cracker which support many different services";
+    homepage = "https://www.thc.org/thc-hydra/";
     license = licenses.agpl3;
-    homepage = https://www.thc.org/thc-hydra/;
-    maintainers = with maintainers; [offline];
+    maintainers = with maintainers; [ offline ];
     platforms = platforms.linux;
   };
 }