3
0
Fork 0
forked from mirrors/nixpkgs

fzf: 0.17.5 -> 0.18.0

This commit is contained in:
xrelkd 2019-07-11 00:36:06 +08:00
parent dc336293a1
commit 4dcd65aa99
2 changed files with 26 additions and 109 deletions

View file

@ -1,27 +1,24 @@
{ stdenv, ncurses, buildGoPackage, fetchFromGitHub, writeText, runtimeShell }:
{ lib, buildGoModule, fetchFromGitHub, writeText, runtimeShell, ncurses, }:
buildGoPackage rec {
name = "fzf-${version}";
version = "0.17.5";
rev = "${version}";
goPackagePath = "github.com/junegunn/fzf";
buildGoModule rec {
pname = "fzf";
version = "0.18.0";
src = fetchFromGitHub {
inherit rev;
owner = "junegunn";
repo = "fzf";
sha256 = "04kalm25sn5k24nrdmbkafp4zvxpm2l3rxchvccl0kz0j3szh62z";
repo = pname;
rev = version;
sha256 = "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl";
};
outputs = [ "bin" "out" "man" ];
modSha256 = "0xc4166d74ix5nzjphrq4rgw7qpskz05ymzl77i2qh2nhbdb53p0";
outputs = [ "out" "man" ];
fishHook = writeText "load-fzf-keybindings.fish" "fzf_key_bindings";
buildInputs = [ ncurses ];
goDeps = ./deps.nix;
patchPhase = ''
sed -i -e "s|expand('<sfile>:h:h')|'$bin'|" plugin/fzf.vim
@ -33,30 +30,34 @@ buildGoPackage rec {
'';
preInstall = ''
mkdir -p $bin/share/fish/vendor_functions.d $bin/share/fish/vendor_conf.d
cp $src/shell/key-bindings.fish $bin/share/fish/vendor_functions.d/fzf_key_bindings.fish
cp ${fishHook} $bin/share/fish/vendor_conf.d/load-fzf-key-bindings.fish
mkdir -p $out/share/fish/{vendor_functions.d,vendor_conf.d}
cp $src/shell/key-bindings.fish $out/share/fish/vendor_functions.d/fzf_key_bindings.fish
cp ${fishHook} $out/share/fish/vendor_conf.d/load-fzf-key-bindings.fish
'';
postInstall = ''
cp $src/bin/fzf-tmux $bin/bin
name="${pname}-${version}"
cp $src/bin/fzf-tmux $out/bin
mkdir -p $man/share/man
cp -r $src/man/man1 $man/share/man
mkdir -p $out/share/vim-plugins/${name}
cp -r $src/plugin $out/share/vim-plugins/${name}
cp -R $src/shell $bin/share/fzf
cat <<SCRIPT > $bin/bin/fzf-share
mkdir -p $out/share/vim-plugins/$name
cp -r $src/plugin $out/share/vim-plugins/$name
cp -R $src/shell $out/share/fzf
cat <<SCRIPT > $out/bin/fzf-share
#!${runtimeShell}
# Run this script to find the fzf shared folder where all the shell
# integration scripts are living.
echo $bin/share/fzf
echo $out/share/fzf
SCRIPT
chmod +x $bin/bin/fzf-share
chmod +x $out/bin/fzf-share
'';
meta = with stdenv.lib; {
homepage = https://github.com/junegunn/fzf;
meta = with lib; {
homepage = "https://github.com/junegunn/fzf";
description = "A command-line fuzzy finder written in Go";
license = licenses.mit;
platforms = platforms.unix;

View file

@ -1,84 +0,0 @@
# This file was generated by go2nix.
[
{
goPackagePath = "github.com/gdamore/encoding";
fetch = {
type = "git";
url = "https://github.com/gdamore/encoding";
rev = "b23993cbb6353f0e6aa98d0ee318a34728f628b9";
sha256 = "0d7irqpx2fa9vkxgkhf04yiwazsm10fxh0yk86x5crflhph5fv8a";
};
}
{
goPackagePath = "github.com/gdamore/tcell";
fetch = {
type = "git";
url = "https://github.com/gdamore/tcell";
rev = "44772c121bb7838819d3ba4a7e84c0c2d617328e";
sha256 = "1l6yhy2bqckanjvixzvslz6qjjl5s0ciqf9hvk6625a7kfx030i6";
};
}
{
goPackagePath = "github.com/lucasb-eyer/go-colorful";
fetch = {
type = "git";
url = "https://github.com/lucasb-eyer/go-colorful";
rev = "c900de9dbbc73129068f5af6a823068fc5f2308c";
sha256 = "0h6dkm5cvnlibngdhkqq7dh8ql8fjzfxn9xqpl3nv10rfwqdk80h";
};
}
{
goPackagePath = "github.com/mattn/go-isatty";
fetch = {
type = "git";
url = "https://github.com/mattn/go-isatty";
rev = "66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8";
sha256 = "17lf13ndnai9a6dlmykqkdyzf1z04q7kffs0l7kvd78wpv3l6rm5";
};
}
{
goPackagePath = "github.com/mattn/go-runewidth";
fetch = {
type = "git";
url = "https://github.com/mattn/go-runewidth";
rev = "14207d285c6c197daabb5c9793d63e7af9ab2d50";
sha256 = "0y6yq9zd4kh7fimnc00r3h9pr2pwa5j85b3jcn5dyfamsnm2xdsv";
};
}
{
goPackagePath = "github.com/mattn/go-shellwords";
fetch = {
type = "git";
url = "https://github.com/mattn/go-shellwords";
rev = "02e3cf038dcea8290e44424da473dd12be796a8a";
sha256 = "1pg7pl25wvpl2dbpyrv9p1r7prnqimxlf6136vn0dfm54j2x4mnr";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "e1a4589e7d3ea14a3352255d04b6f1a418845e5e";
sha256 = "1w90z8r4v96rqx723shjgl8dis12bfmihila20fxid11m8digk5h";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "b90f89a1e7a9c1f6b918820b3daa7f08488c8594";
sha256 = "1bnvvk2z6wlmh39wza9cdf81nbyjfssdh86iywnnpxa7n9lg9dxq";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://go.googlesource.com/text";
rev = "4ee4af566555f5fbe026368b75596286a312663a";
sha256 = "1zybf6nd47fr9vb587yvmzhmkzf2p58g9q5bz4q5mzpnz22ski3a";
};
}
]