tmux: move plugins to config

This commit is contained in:
Hydroxycarbamide 2024-09-23 13:14:08 +02:00
parent 36249eb571
commit 3b5aebcd93
122 changed files with 4210 additions and 2 deletions

View file

@ -0,0 +1,48 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
devPackages = [
(pkgs.bats.withLibraries (p: [ p.bats-support p.bats-assert ]))
pkgs.watchexec
];
plugin = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "session-wizard";
rtpFilePath = "session-wizard.tmux";
version = "unstable";
src = self;
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
ls -al $target && \
substituteInPlace $target/session-wizard.tmux \
--replace \$CURRENT_DIR/bin/t $target/bin/t
wrapProgram $target/bin/t \
--prefix PATH : ${with pkgs; lib.makeBinPath ([ fzf zoxide coreutils gnugrep gnused ])}
'';
};
in
{
packages.dev = (pkgs.symlinkJoin
{
name = "dev-environment";
paths = [
plugin
plugin.buildInputs
pkgs.tmux
pkgs.bashInteractive
pkgs.busybox
] ++ devPackages;
});
devShell = pkgs.mkShell {
buildInputs = devPackages;
};
}
);
}