fzf: application extracted from goPackages

This commit is contained in:
Kamil Chmielewski
2016-06-02 21:21:45 +02:00
parent dfe1064b4e
commit dbf48cd10b
4 changed files with 54 additions and 47 deletions

View File

@@ -0,0 +1,33 @@
# This file was generated by go2nix.
{ stdenv, lib, ncurses, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }:
with goPackages;
buildGoPackage rec {
name = "fzf-${version}";
version = "0.12.2";
rev = "${version}";
goPackagePath = "github.com/junegunn/fzf";
src = fetchgit {
inherit rev;
url = "https://github.com/junegunn/fzf";
sha256 = "02qqcnijv8z3736iczbx082yizpqk02g5k746k7sdgfkgyxydppk";
};
buildInputs = [ ncurses ];
goDeps = ./deps.json;
patchPhase = ''
sed -i -e "s|expand('<sfile>:h:h').'/bin/fzf'|'$bin/bin/fzf'|" plugin/fzf.vim
sed -i -e "s|expand('<sfile>:h:h').'/bin/fzf-tmux'|'$bin/bin/fzf-tmux'|" plugin/fzf.vim
'';
postInstall= ''
cp $src/bin/fzf-tmux $bin/bin
mkdir -p $out/share/vim-plugins
ln -s $out/share/go/src/github.com/junegunn/fzf $out/share/vim-plugins/${(builtins.parseDrvName fzf.name).name}
'';
}

View File

@@ -0,0 +1,20 @@
[
{
"goPackagePath": "github.com/junegunn/go-runewidth",
"fetch": {
"type": "git",
"url": "https://github.com/junegunn/go-runewidth",
"rev": "63c378b851290989b19ca955468386485f118c65",
"sha256": "1z5mhfrpqdssn3603vwd95w69z28igwq96lh7b9rrdcx440i822d"
}
},
{
"goPackagePath": "github.com/junegunn/go-shellwords",
"fetch": {
"type": "git",
"url": "https://github.com/junegunn/go-shellwords",
"rev": "35d512af75e283aae4ca1fc3d44b159ed66189a4",
"sha256": "08la0axabk9hiba9mm4ypp6a116qhvdlxa1jvkxhv3d4zpjsp4n7"
}
}
]