From 1fa28ae95dab9c83d989814305342472620dcb22 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Sun, 4 Mar 2018 00:39:16 +0900 Subject: [PATCH] [RDY] skim: init at 0.3.2 (#33561) --- pkgs/misc/vim-plugins/default.nix | 10 ++++++- pkgs/tools/misc/skim/default.nix | 43 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/misc/skim/default.nix diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 2eae839c4508..78aed2aa833c 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -1,7 +1,7 @@ # TODO check that no license information gets lost { fetchurl, stdenv, python, go, cmake, vim, vimUtils, perl, ruby, unzip , which, fetchgit, llvmPackages -, xkb_switch, rustracerd, fzf +, xkb_switch, rustracerd, fzf, skim , python3, boost, icu , ycmd, makeWrapper, rake , pythonPackages, python3Packages @@ -12,6 +12,8 @@ let + _skim = skim; + inherit (vimUtils.override {inherit vim;}) rtpPath addRtp buildVimPlugin buildVimPluginFrom2Nix vimHelpTags; in @@ -140,6 +142,12 @@ rec { dependencies = []; }; + skim = buildVimPluginFrom2Nix { + name = _skim.name; + src = _skim.vim; + dependencies = []; + }; + # --- generated packages bellow this line --- CSApprox = buildVimPluginFrom2Nix { # created by nix#NixDerivation diff --git a/pkgs/tools/misc/skim/default.nix b/pkgs/tools/misc/skim/default.nix new file mode 100644 index 000000000000..709cbbe07912 --- /dev/null +++ b/pkgs/tools/misc/skim/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + name = "skim-${version}"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "lotabout"; + repo = "skim"; + rev = "v${version}"; + sha256 = "0spkkgjjrch1grb0115rn0wxzsh8pzmm96a7j69zy5pc1il2m5lp"; + }; + + outputs = [ "out" "vim" ]; + + cargoSha256 = "0zbjnii8r41ih2m2vqhm3wdiwgi13kipvxx75sg4vm4maf4wpmhv"; + + patchPhase = '' + sed -i -e "s|expand(':h:h')|'$out'|" plugin/skim.vim + ''; + + postInstall = '' + install -D -m 555 bin/sk-tmux -t $out/bin + install -D -m 444 shell/* -t $out/share/skim + install -D -m 444 plugin/skim.vim -t $vim/plugin + + cat <