about summary refs log tree commit diff
path: root/pkgs/tools/security/john
diff options
context:
space:
mode:
authorNicolas Berbiche <nicolas@normie.dev>2022-04-23 17:05:44 -0400
committerNicolas Berbiche <nicolas@normie.dev>2022-04-25 19:49:13 -0400
commit8b0e73e70cda02d67119b53e00ce6832b00172f2 (patch)
tree2c7fa6701e6f0db20586d8c3c8518f926c8dedee /pkgs/tools/security/john
parentc8c2bbb27f7703177b43c402dcc334bfb6563f44 (diff)
john: add gcc11 patch
Diffstat (limited to 'pkgs/tools/security/john')
-rw-r--r--pkgs/tools/security/john/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/tools/security/john/default.nix b/pkgs/tools/security/john/default.nix
index be6514630f56a..bac76aabc1355 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
+, gcc, python3Packages, perl, perlPackages, makeWrapper, fetchpatch
 }:
 
 with lib;
@@ -13,6 +13,14 @@ stdenv.mkDerivation rec {
     sha256 = "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm";
   };
 
+  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/!