Merge pull request #44560 from kalbasit/nixpkgs-export-buildtmuxplugin
tmuxPlugins: expose mkDerivation for creating a TMUX plugins
This commit is contained in:
commit
00991101a0
@ -5,17 +5,17 @@ let
|
|||||||
|
|
||||||
addRtp = path: rtpFilePath: attrs: derivation:
|
addRtp = path: rtpFilePath: attrs: derivation:
|
||||||
derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
|
derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
|
||||||
overrideAttrs = f: buildTmuxPlugin (attrs // f attrs);
|
overrideAttrs = f: mkDerivation (attrs // f attrs);
|
||||||
};
|
};
|
||||||
|
|
||||||
buildTmuxPlugin = a@{
|
mkDerivation = a@{
|
||||||
pluginName,
|
pluginName,
|
||||||
rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
|
rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
|
||||||
namePrefix ? "tmuxplugin-",
|
namePrefix ? "tmuxplugin-",
|
||||||
src,
|
src,
|
||||||
unpackPhase ? "",
|
unpackPhase ? "",
|
||||||
configurePhase ? "",
|
configurePhase ? ":",
|
||||||
buildPhase ? "",
|
buildPhase ? ":",
|
||||||
addonInfo ? null,
|
addonInfo ? null,
|
||||||
preInstall ? "",
|
preInstall ? "",
|
||||||
postInstall ? "",
|
postInstall ? "",
|
||||||
@ -44,14 +44,11 @@ let
|
|||||||
dependencies = [ pkgs.bash ] ++ dependencies;
|
dependencies = [ pkgs.bash ] ++ dependencies;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
buildTmuxPluginFrom2Nix = a: buildTmuxPlugin ({
|
|
||||||
buildPhase = ":";
|
|
||||||
configurePhase =":";
|
|
||||||
} // a);
|
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
battery = buildTmuxPluginFrom2Nix {
|
inherit mkDerivation;
|
||||||
|
|
||||||
|
battery = mkDerivation {
|
||||||
pluginName = "battery";
|
pluginName = "battery";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-battery";
|
url = "https://github.com/tmux-plugins/tmux-battery";
|
||||||
@ -60,7 +57,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
continuum = buildTmuxPluginFrom2Nix {
|
continuum = mkDerivation {
|
||||||
pluginName = "continuum";
|
pluginName = "continuum";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-continuum";
|
url = "https://github.com/tmux-plugins/tmux-continuum";
|
||||||
@ -70,7 +67,7 @@ in rec {
|
|||||||
dependencies = [ resurrect ];
|
dependencies = [ resurrect ];
|
||||||
};
|
};
|
||||||
|
|
||||||
copycat = buildTmuxPluginFrom2Nix {
|
copycat = mkDerivation {
|
||||||
pluginName = "copycat";
|
pluginName = "copycat";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-copycat";
|
url = "https://github.com/tmux-plugins/tmux-copycat";
|
||||||
@ -79,7 +76,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu = buildTmuxPluginFrom2Nix {
|
cpu = mkDerivation {
|
||||||
pluginName = "cpu";
|
pluginName = "cpu";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-cpu";
|
url = "https://github.com/tmux-plugins/tmux-cpu";
|
||||||
@ -88,7 +85,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fpp = buildTmuxPluginFrom2Nix {
|
fpp = mkDerivation {
|
||||||
pluginName = "fpp";
|
pluginName = "fpp";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-fpp";
|
url = "https://github.com/tmux-plugins/tmux-fpp";
|
||||||
@ -101,7 +98,7 @@ in rec {
|
|||||||
dependencies = [ pkgs.fpp ];
|
dependencies = [ pkgs.fpp ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fzf-tmux-url = buildTmuxPluginFrom2Nix {
|
fzf-tmux-url = mkDerivation {
|
||||||
pluginName = "fzf-tmux-url";
|
pluginName = "fzf-tmux-url";
|
||||||
rtpFilePath = "fzf-url.tmux";
|
rtpFilePath = "fzf-url.tmux";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
@ -111,7 +108,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
logging = buildTmuxPluginFrom2Nix {
|
logging = mkDerivation {
|
||||||
pluginName = "logging";
|
pluginName = "logging";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-logging";
|
url = "https://github.com/tmux-plugins/tmux-logging";
|
||||||
@ -120,7 +117,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
net-speed = buildTmuxPluginFrom2Nix {
|
net-speed = mkDerivation {
|
||||||
pluginName = "net-speed";
|
pluginName = "net-speed";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-net-speed";
|
url = "https://github.com/tmux-plugins/tmux-net-speed";
|
||||||
@ -129,7 +126,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
maildir-counter = buildTmuxPluginFrom2Nix {
|
maildir-counter = mkDerivation {
|
||||||
pluginName = "maildir-counter";
|
pluginName = "maildir-counter";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-maildir-counter";
|
url = "https://github.com/tmux-plugins/tmux-maildir-counter";
|
||||||
@ -138,7 +135,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
online-status = buildTmuxPluginFrom2Nix {
|
online-status = mkDerivation {
|
||||||
pluginName = "online-status";
|
pluginName = "online-status";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-online-status";
|
url = "https://github.com/tmux-plugins/tmux-online-status";
|
||||||
@ -147,7 +144,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
open = buildTmuxPluginFrom2Nix {
|
open = mkDerivation {
|
||||||
pluginName = "open";
|
pluginName = "open";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-open";
|
url = "https://github.com/tmux-plugins/tmux-open";
|
||||||
@ -156,7 +153,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pain-control = buildTmuxPluginFrom2Nix {
|
pain-control = mkDerivation {
|
||||||
pluginName = "pain-control";
|
pluginName = "pain-control";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-pain-control";
|
url = "https://github.com/tmux-plugins/tmux-pain-control";
|
||||||
@ -165,7 +162,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
prefix-highlight = buildTmuxPluginFrom2Nix {
|
prefix-highlight = mkDerivation {
|
||||||
pluginName = "prefix-highlight";
|
pluginName = "prefix-highlight";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-prefix-highlight";
|
url = "https://github.com/tmux-plugins/tmux-prefix-highlight";
|
||||||
@ -174,7 +171,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
resurrect = buildTmuxPluginFrom2Nix {
|
resurrect = mkDerivation {
|
||||||
pluginName = "resurrect";
|
pluginName = "resurrect";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-resurrect";
|
url = "https://github.com/tmux-plugins/tmux-resurrect";
|
||||||
@ -183,7 +180,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sensible = buildTmuxPluginFrom2Nix {
|
sensible = mkDerivation {
|
||||||
pluginName = "sensible";
|
pluginName = "sensible";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-sensible";
|
url = "https://github.com/tmux-plugins/tmux-sensible";
|
||||||
@ -192,7 +189,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionist = buildTmuxPluginFrom2Nix {
|
sessionist = mkDerivation {
|
||||||
pluginName = "sessionist";
|
pluginName = "sessionist";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-sessionist";
|
url = "https://github.com/tmux-plugins/tmux-sessionist";
|
||||||
@ -201,7 +198,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sidebar = buildTmuxPluginFrom2Nix {
|
sidebar = mkDerivation {
|
||||||
pluginName = "sidebar";
|
pluginName = "sidebar";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-sidebar";
|
url = "https://github.com/tmux-plugins/tmux-sidebar";
|
||||||
@ -210,7 +207,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
urlview = buildTmuxPluginFrom2Nix {
|
urlview = mkDerivation {
|
||||||
pluginName = "urlview";
|
pluginName = "urlview";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-urlview";
|
url = "https://github.com/tmux-plugins/tmux-urlview";
|
||||||
@ -223,7 +220,7 @@ in rec {
|
|||||||
dependencies = [ pkgs.urlview ];
|
dependencies = [ pkgs.urlview ];
|
||||||
};
|
};
|
||||||
|
|
||||||
yank = buildTmuxPluginFrom2Nix {
|
yank = mkDerivation {
|
||||||
pluginName = "yank";
|
pluginName = "yank";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/tmux-plugins/tmux-yank";
|
url = "https://github.com/tmux-plugins/tmux-yank";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user