summary refs log tree commit diff
path: root/pkgs/shells/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells/zsh')
-rw-r--r--pkgs/shells/zsh/zsh-fzf-tab/darwin.patch11
-rw-r--r--pkgs/shells/zsh/zsh-fzf-tab/default.nix4
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/shells/zsh/zsh-fzf-tab/darwin.patch b/pkgs/shells/zsh/zsh-fzf-tab/darwin.patch
new file mode 100644
index 00000000000..54b6ce26138
--- /dev/null
+++ b/pkgs/shells/zsh/zsh-fzf-tab/darwin.patch
@@ -0,0 +1,11 @@
+diff --git a/modules/Src/aloxaf/fzftab.c b/modules/Src/aloxaf/fzftab.c
+index 60b6330..91975d8 100644
+--- a/modules/Src/aloxaf/fzftab.c
++++ b/modules/Src/aloxaf/fzftab.c
+@@ -1,6 +1,5 @@
+ #include "fzftab.mdh"
+ #include "fzftab.pro"
+-#include <malloc.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
diff --git a/pkgs/shells/zsh/zsh-fzf-tab/default.nix b/pkgs/shells/zsh/zsh-fzf-tab/default.nix
index ccf60e6d76a..ad1b7d3d740 100644
--- a/pkgs/shells/zsh/zsh-fzf-tab/default.nix
+++ b/pkgs/shells/zsh/zsh-fzf-tab/default.nix
@@ -15,6 +15,8 @@ in stdenv.mkDerivation rec {
 
   buildInputs = [ ncurses ];
 
+  patches = lib.optionals stdenv.isDarwin [ ./darwin.patch ];
+
   postConfigure = ''
     pushd modules
     ./configure --disable-gdbm --without-tcsetpgrp
@@ -40,6 +42,6 @@ in stdenv.mkDerivation rec {
     description = "Replace zsh's default completion selection menu with fzf!";
     license = licenses.mit;
     maintainers = with maintainers; [ vonfry ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }