From 2b022a979ab40832bf35442fe5a5e5466e97619e Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Sun, 12 Sep 2021 21:58:48 +0800 Subject: [PATCH] zsh-fzf-tab: Support darwin platform (#137514) Co-authored-by: Sandro --- pkgs/shells/zsh/zsh-fzf-tab/darwin.patch | 11 +++++++++++ pkgs/shells/zsh/zsh-fzf-tab/default.nix | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/shells/zsh/zsh-fzf-tab/darwin.patch 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 000000000000..54b6ce26138a --- /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 + #include + #include + #include diff --git a/pkgs/shells/zsh/zsh-fzf-tab/default.nix b/pkgs/shells/zsh/zsh-fzf-tab/default.nix index ccf60e6d76af..ad1b7d3d740c 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; }; }