From 4dcd65aa993d908a32a71fe69156d4021fcf887f Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Thu, 11 Jul 2019 00:36:06 +0800 Subject: [PATCH] fzf: 0.17.5 -> 0.18.0 --- pkgs/tools/misc/fzf/default.nix | 51 ++++++++++---------- pkgs/tools/misc/fzf/deps.nix | 84 --------------------------------- 2 files changed, 26 insertions(+), 109 deletions(-) delete mode 100644 pkgs/tools/misc/fzf/deps.nix diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index de211d1d1c4e..66da4f53099a 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -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(':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 <