depot/third_party/nixpkgs/pkgs/misc/tmux-plugins/tmux-fingers/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

46 lines
1,012 B
Nix

{
mkTmuxPlugin,
substituteAll,
fetchFromGitHub,
crystal,
}:
let
fingers = crystal.buildCrystalPackage rec {
format = "shards";
version = "2.2.2";
pname = "fingers";
src = fetchFromGitHub {
owner = "Morantron";
repo = "tmux-fingers";
rev = "${version}";
sha256 = "sha256-m9QON7diHVEDnnv/alXCJOG+BnfrAKygScrubZZ605I=";
};
shardsFile = ./shards.nix;
crystalBinaries.tmux-fingers.src = "src/fingers.cr";
postInstall = ''
shopt -s dotglob extglob
rm -rv !("tmux-fingers.tmux"|"bin")
shopt -u dotglob extglob
'';
# TODO: Needs starting a TMUX session to run tests
# Unhandled exception: Missing ENV key: "TMUX" (KeyError)
doCheck = false;
doInstallCheck = false;
};
in
mkTmuxPlugin {
inherit (fingers) version src meta;
pluginName = fingers.src.repo;
rtpFilePath = "tmux-fingers.tmux";
patches = [
(substituteAll {
src = ./fix.patch;
tmuxFingersDir = "${fingers}/bin";
})
];
}