75ca762b89
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv, lib, fetchFromGitHub, ncurses }:
|
|
|
|
let
|
|
INSTALL_PATH="${placeholder "out"}/share/fzf-tab";
|
|
in stdenv.mkDerivation rec {
|
|
pname = "zsh-fzf-tab";
|
|
version = "unstable-2021-02-14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Aloxaf";
|
|
repo = "fzf-tab";
|
|
rev = "8cebb8f01ca57076c3c7cd66365270d989bcaa89";
|
|
sha256 = "119m84g2c4z9xdr22j401p09n3cpiyj61dw5m7xkm6309nd7zz0a";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|