zsh: migrate to PCRE2

authored by FliegendeWurst and committed by Masum Reza c5f66460 ccc9bdfc

+20 -12
+20 -12
pkgs/by-name/zs/zsh/package.nix
··· 10 10 util-linux, 11 11 texinfo, 12 12 ncurses, 13 - pcre, 13 + pcre2, 14 14 pkg-config, 15 15 buildPackages, 16 16 nixosTests, ··· 52 52 hash = "sha256-oA8GC8LmuqNKGuPqGfiQVhL5nWb7ArLWGUI6wjpsIW8="; 53 53 excludes = [ "ChangeLog" ]; 54 54 }) 55 + # PCRE 2.x support 56 + (fetchpatch { 57 + url = "https://github.com/zsh-users/zsh/commit/1b421e4978440234fb73117c8505dad1ccc68d46.patch"; 58 + hash = "sha256-jqTXnz56L3X21e3kXtzrT1jKEq+K7ittFjL7GdHVq94="; 59 + excludes = [ "ChangeLog" ]; 60 + }) 61 + (fetchpatch { 62 + url = "https://github.com/zsh-users/zsh/commit/b62e911341c8ec7446378b477c47da4256053dc0.patch"; 63 + hash = "sha256-MfyiLucaSNNfdCLutgv/kL/oi/EVoxZVUd1KjGzN9XI="; 64 + excludes = [ "ChangeLog" ]; 65 + }) 66 + (fetchpatch { 67 + url = "https://github.com/zsh-users/zsh/commit/10bdbd8b5b0b43445aff23dcd412f25cf6aa328a.patch"; 68 + hash = "sha256-bl1PG9Zk1wK+2mfbCBhD3OEpP8HQboqEO8sLFqX8DmA="; 69 + excludes = [ "ChangeLog" ]; 70 + }) 55 71 ] 56 72 ++ lib.optionals stdenv.cc.isGNU [ 57 73 # Fixes compilation with gcc >= 14. ··· 78 94 79 95 buildInputs = [ 80 96 ncurses 81 - pcre 97 + pcre2 82 98 ]; 83 99 100 + env.PCRE_CONFIG = lib.getExe' (lib.getDev pcre2) "pcre2-config"; 101 + 84 102 configureFlags = 85 103 [ 86 104 "--enable-maildir-support" ··· 102 120 "zsh_cv_sys_dynamic_strip_exe=yes" 103 121 "zsh_cv_sys_dynamic_strip_lib=yes" 104 122 ]; 105 - 106 - postPatch = '' 107 - substituteInPlace Src/Modules/pcre.mdd \ 108 - --replace 'pcre-config' 'true' 109 - ''; 110 - 111 - preConfigure = '' 112 - # use pkg-config instead of pcre-config 113 - configureFlagsArray+=("PCRECONF=''${PKG_CONFIG} libpcre") 114 - ''; 115 123 116 124 # the zsh/zpty module is not available on hydra 117 125 # so skip groups Y Z