2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchCrate, rustPlatform }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "skim";
|
2021-02-16 17:04:54 +00:00
|
|
|
version = "0.9.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2021-02-16 17:04:54 +00:00
|
|
|
sha256 = "0yvjzmz2vqc63l8911jflqf5aww7wxsav2yal5wg9ci9hzq6dl7j";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "vim" ];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "1jk2vcm2z6r1xd6md98jzpcy7kdwp5p2fzxvvaz9qscyfnx28x17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e "s|expand('<sfile>:h:h')|'$out'|" plugin/skim.vim
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -D -m 555 bin/sk-tmux -t $out/bin
|
|
|
|
install -D -m 644 man/man1/* -t $out/man/man1
|
|
|
|
install -D -m 444 shell/* -t $out/share/skim
|
|
|
|
install -D -m 444 plugin/skim.vim -t $vim/plugin
|
|
|
|
|
|
|
|
cat <<SCRIPT > $out/bin/sk-share
|
|
|
|
#! ${stdenv.shell}
|
|
|
|
# Run this script to find the skim shared folder where all the shell
|
|
|
|
# integration scripts are living.
|
|
|
|
echo $out/share/skim
|
|
|
|
SCRIPT
|
|
|
|
chmod +x $out/bin/sk-share
|
|
|
|
'';
|
|
|
|
|
2022-01-23 02:10:13 +00:00
|
|
|
# https://github.com/lotabout/skim/issues/440
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line fuzzy finder written in Rust";
|
|
|
|
homepage = "https://github.com/lotabout/skim";
|
|
|
|
license = licenses.mit;
|
2022-08-12 12:06:08 +00:00
|
|
|
mainProgram = "sk";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ dywedir ];
|
|
|
|
};
|
|
|
|
}
|