tmux-sessionizer: use getExe

This commit is contained in:
Zynh Ludwig 2024-08-08 21:34:33 -07:00
parent da24f19a47
commit 858905ac30

View file

@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (lib) getExe getExe';
cfg = config.snowhawk.tmux.sessionizer; cfg = config.snowhawk.tmux.sessionizer;
tmuxCfg = config.snowhawk.tmux; tmuxCfg = config.snowhawk.tmux;
@ -37,12 +39,12 @@ in
snowhawk.tmux.sessionizer.pkg = snowhawk.tmux.sessionizer.pkg =
let let
tmux = "${pkgs.tmux}/bin/tmux"; tmux = getExe pkgs.tmux;
pgrep = "${pkgs.procps}/bin/pgrep"; pgrep = getExe' pkgs.procps "pgrep";
basename = "${pkgs.coreutils}/bin/basename"; basename = getExe' pkgs.coreutils "basename";
tr = "${pkgs.coreutils}/bin/tr"; tr = getExe' pkgs.coreutils "tr";
fzf = "${pkgs.fzf}/bin/fzf"; fzf = getExe pkgs.fzf;
find = "${pkgs.findutils}/bin/find"; find = getExe pkgs.findutils;
in in
lib.mkDefault (pkgs.writeShellScriptBin "tmux-sessionizer" '' lib.mkDefault (pkgs.writeShellScriptBin "tmux-sessionizer" ''
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then