{ lib, fetchFromGitHub, pkgs, stdenv, config, }: let rtpPath = "share/tmux-plugins"; addRtp = path: rtpFilePath: attrs: derivation: derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // { overrideAttrs = f: mkTmuxPlugin (attrs // f attrs); }; mkTmuxPlugin = a@{ pluginName, rtpFilePath ? (builtins.replaceStrings [ "-" ] [ "_" ] pluginName) + ".tmux", namePrefix ? "tmuxplugin-", src, unpackPhase ? "", configurePhase ? ":", buildPhase ? ":", addonInfo ? null, preInstall ? "", postInstall ? "", path ? lib.getName pluginName, ... }: if lib.hasAttr "dependencies" a then throw "dependencies attribute is obselete. see NixOS/nixpkgs#118034" # added 2021-04-01 else addRtp "${rtpPath}/${path}" rtpFilePath a ( stdenv.mkDerivation ( a // { pname = namePrefix + pluginName; inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall ; installPhase = '' runHook preInstall target=$out/${rtpPath}/${path} mkdir -p $out/${rtpPath} cp -r . $target if [ -n "$addonInfo" ]; then echo "$addonInfo" > $target/addon-info.json fi runHook postInstall ''; } ) ); in rec { inherit mkTmuxPlugin; tmux-select-pane-no-wrap = mkTmuxPlugin rec { pluginName = "tmux-select-pane-no-wrap"; version = "00add78"; src = fetchFromGitHub { owner = "dalejung"; repo = pluginName; rev = version; sha256 = "sha256-ot0cHvk1TXvHOw9z+7TLSiHT77jHwvV2PSHcNuhOorQ="; }; }; }