about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2022-05-03 20:02:08 +0200
committerGitHub <noreply@github.com>2022-05-03 20:02:08 +0200
commitfd2c8f930f0535cdb96886cc27f052d8fdb2c68e (patch)
tree9fde3dde71f60181be697554f53a2564cb7f2be1 /pkgs/tools/security
parent357f1b79815bb7052d58c45a76a546f1046aebd0 (diff)
parent733730eff86f0df80aeddaafe729e562d26c1b1b (diff)
Merge pull request #170013 from berbiche/john-gcc-11-patch
john: add gcc11 patch
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/john/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/pkgs/tools/security/john/default.nix b/pkgs/tools/security/john/default.nix
index be6514630f56a..9a3c03d6d2bc3 100644
--- a/pkgs/tools/security/john/default.nix
+++ b/pkgs/tools/security/john/default.nix
@@ -1,5 +1,5 @@
-{ lib, stdenv, fetchurl, openssl, nss, nspr, libkrb5, gmp, zlib, libpcap, re2
-, gcc, python3Packages, perl, perlPackages, makeWrapper
+{ lib, stdenv, fetchFromGitHub, openssl, nss, nspr, libkrb5, gmp, zlib, libpcap, re2
+, gcc, python3Packages, perl, perlPackages, makeWrapper, fetchpatch
 }:
 
 with lib;
@@ -8,11 +8,21 @@ stdenv.mkDerivation rec {
   pname = "john";
   version = "1.9.0-jumbo-1";
 
-  src = fetchurl {
-    url = "http://www.openwall.com/john/k/${pname}-${version}.tar.xz";
-    sha256 = "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm";
+  src = fetchFromGitHub {
+    owner = "openwall";
+    repo = pname;
+    rev = "1.9.0-Jumbo-1";
+    sha256 = "sha256-O1iPh5QTMjZ78sKvGbvSpaHFbBuVc1z49UKTbMa24Rs=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "fix-gcc-11-struct-allignment-incompatibility.patch";
+      url = "https://github.com/openwall/john/commit/154ee1156d62dd207aff0052b04c61796a1fde3b.patch";
+      sha256 = "sha256-3rfS2tu/TF+KW2MQiR+bh4w/FVECciTooDQNTHNw31A=";
+    })
+  ];
+
   postPatch = ''
     sed -ri -e '
       s!^(#define\s+CFG_[A-Z]+_NAME\s+).*/!\1"'"$out"'/etc/john/!
@@ -69,8 +79,8 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "John the Ripper password cracker";
-    license = licenses.gpl2;
-    homepage = "https://github.com/magnumripper/JohnTheRipper/";
+    license = licenses.gpl2Plus;
+    homepage = "https://github.com/openwall/john/";
     maintainers = with maintainers; [ offline matthewbauer ];
     platforms = platforms.unix;
   };