Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
83 lines
1.8 KiB
Nix
83 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
runtimeShell,
|
|
rustPlatform,
|
|
skim,
|
|
testers,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "skim";
|
|
version = "0.20.5";
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
"vim"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "skim-rs";
|
|
repo = "skim";
|
|
tag = "v${version}";
|
|
hash = "sha256-BX0WW7dNpNLwxlclFCxj0QnrQ58lchKiEnmethzceqk=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i -e "s|expand('<sfile>:h:h')|'$out'|" plugin/skim.vim
|
|
'';
|
|
|
|
cargoHash = "sha256-t2hkWTb/GhesNCWe2/YunZFo26xcXMjoNCiaKaFLOBk=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postBuild = ''
|
|
cat <<SCRIPT > sk-share
|
|
#! ${runtimeShell}
|
|
# Run this script to find the skim shared folder where all the shell
|
|
# integration scripts are living.
|
|
echo $out/share/skim
|
|
SCRIPT
|
|
'';
|
|
|
|
postInstall = ''
|
|
installBin bin/sk-tmux
|
|
install -D -m 444 plugin/skim.vim -t $vim/plugin
|
|
install -D -m 444 shell/* -t $out/share/skim
|
|
|
|
installBin sk-share
|
|
installManPage $(find man -type f)
|
|
installShellCompletion \
|
|
--cmd sk \
|
|
--bash shell/completion.bash \
|
|
--fish shell/completion.fish \
|
|
--zsh shell/completion.zsh
|
|
'';
|
|
|
|
# Doc tests are broken on aarch64
|
|
# https://github.com/lotabout/skim/issues/440
|
|
cargoTestFlags = lib.optional stdenv.hostPlatform.isAarch64 "--all-targets";
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion { package = skim; };
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Command-line fuzzy finder written in Rust";
|
|
homepage = "https://github.com/skim-rs/skim";
|
|
changelog = "https://github.com/skim-rs/skim/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
dywedir
|
|
getchoo
|
|
krovuxdev
|
|
];
|
|
mainProgram = "sk";
|
|
};
|
|
}
|