2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ncurses }:
|
|
|
|
|
|
|
|
let
|
|
|
|
INSTALL_PATH="${placeholder "out"}/share/fzf-tab";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "zsh-fzf-tab";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "unstable-2021-11-12";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Aloxaf";
|
|
|
|
repo = "fzf-tab";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "190500bf1de6a89416e2a74470d3b5cceab102ba";
|
|
|
|
sha256 = "1dipsy0s67fr47ig5559bcp1h5yn8rdjshhs8zsq7j8plvvh99qb";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [ ./darwin.patch ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
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 ];
|
2021-09-18 10:52:07 +00:00
|
|
|
platforms = platforms.unix;
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|