tmuxPlugins: expose mkDerivation for creating a TMUX plugins

This commit is contained in:
Wael M. Nasreddine 2018-08-06 12:08:59 -07:00
parent b234f07762
commit e8a5f6c225
No known key found for this signature in database
GPG Key ID: 82AE0A31B33CEFCF

View File

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