about summary refs log tree commit diff
path: root/pkgs/shells/zsh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells/zsh/default.nix')
-rw-r--r--pkgs/shells/zsh/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix
index 1a085c0e062c..1297e622269f 100644
--- a/pkgs/shells/zsh/default.nix
+++ b/pkgs/shells/zsh/default.nix
@@ -45,6 +45,7 @@ stdenv.mkDerivation {
     "--enable-pcre"
     "--enable-zshenv=${placeholder "out"}/etc/zshenv"
     "--disable-site-fndir"
+    "--enable-function-subdirs"
   ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform && !stdenv.hostPlatform.isStatic) [
     # Also see: https://github.com/buildroot/buildroot/commit/2f32e668aa880c2d4a2cce6c789b7ca7ed6221ba
     "zsh_cv_shared_environ=yes"
@@ -57,6 +58,11 @@ stdenv.mkDerivation {
     "zsh_cv_sys_dynamic_strip_lib=yes"
   ];
 
+  postPatch = ''
+    substituteInPlace Src/Modules/pcre.mdd \
+      --replace 'pcre-config' 'true'
+  '';
+
   preConfigure = ''
     # use pkg-config instead of pcre-config
     configureFlagsArray+=("PCRECONF=''${PKG_CONFIG} libpcre")
@@ -107,6 +113,10 @@ EOF
   '';
   # XXX: patch zsh to take zwc if newer _or equal_
 
+  postFixup = ''
+    HOST_PATH=$out/bin:$HOST_PATH patchShebangs --host $out/share/zsh/*/functions
+  '';
+
   meta = {
     description = "The Z shell";
     longDescription = ''