about summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorVonfry <3413119+Vonfry@users.noreply.github.com>2021-01-25 08:17:21 +0800
committerGitHub <noreply@github.com>2021-01-25 01:17:21 +0100
commit057017ee8673a217da3b7530b298fbd0b974000f (patch)
treed414a3e4f50b5b751884705a90db22c2d3d40950 /pkgs/shells
parent81db4e543c0ee8d7b1973d41e5527c80f0fa613a (diff)
downloadnixlib-057017ee8673a217da3b7530b298fbd0b974000f.tar
nixlib-057017ee8673a217da3b7530b298fbd0b974000f.tar.gz
nixlib-057017ee8673a217da3b7530b298fbd0b974000f.tar.bz2
nixlib-057017ee8673a217da3b7530b298fbd0b974000f.tar.lz
nixlib-057017ee8673a217da3b7530b298fbd0b974000f.tar.xz
nixlib-057017ee8673a217da3b7530b298fbd0b974000f.tar.zst
nixlib-057017ee8673a217da3b7530b298fbd0b974000f.zip
zsh-fzf-tab: init at 2021-01-24 (#110694)
* zsh-fzf-tab: init at 2021-01-24

* Update pkgs/shells/zsh/zsh-fzf-tab/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/zsh/zsh-fzf-tab/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/zsh-fzf-tab/default.nix b/pkgs/shells/zsh/zsh-fzf-tab/default.nix
new file mode 100644
index 000000000000..b48eda0a728a
--- /dev/null
+++ b/pkgs/shells/zsh/zsh-fzf-tab/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchFromGitHub, ncurses }:
+
+let
+  INSTALL_PATH="${placeholder "out"}/share/fzf-tab";
+in stdenv.mkDerivation rec {
+  pname = "zsh-fzf-tab";
+  version = "unstable-2021-01-24";
+
+  src = fetchFromGitHub {
+    owner = "Aloxaf";
+    repo = "fzf-tab";
+    rev = "78b4cefb27dc2bef5e4c9ac3bf2bd28413620fcd";
+    sha256 = "1f5m7vf7wxzczis2nzvhgqaqnphhp3a0wv8b612m7g4fnvk3lnkn";
+  };
+
+  buildInputs = [ ncurses ];
+
+  postConfigure = ''
+    pushd modules
+    ./configure --disable-gdbm --without-tcsetpgrp
+    popd
+  '';
+
+  postBuild = ''
+    pushd modules
+    make -j$NIX_BUILD_CORES
+    popd
+  '';
+
+  installPhase = ''
+     mkdir -p ${INSTALL_PATH}
+     cp -r lib ${INSTALL_PATH}/lib
+     install -D fzf-tab.zsh ${INSTALL_PATH}/fzf-tab.zsh
+     install -D fzf-tab.plugin.zsh ${INSTALL_PATH}/fzf-tab.plugin.zsh
+     install -D modules/Src/aloxaf/fzftab.so ${INSTALL_PATH}/modules/Src/aloxaf/fzftab.so
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Aloxaf/fzf-tab";
+    description = "Replace zsh's default completion selection menu with fzf!";
+    license = licenses.mit;
+    maintainers = with maintainers; [ vonfry ];
+    platforms = platforms.linux;
+  };
+}