Merge pull request #115718 from timstott/tmuxPlugins-refactor-mkTmuxPlugin
tmuxPlugins: rename function to build plugin
This commit is contained in:
commit
802cc885e4
@ -1,7 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, pkgs
|
, pkgs
|
||||||
, reattach-to-user-namespace
|
|
||||||
, stdenv
|
, stdenv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -10,10 +9,10 @@ let
|
|||||||
|
|
||||||
addRtp = path: rtpFilePath: attrs: derivation:
|
addRtp = path: rtpFilePath: attrs: derivation:
|
||||||
derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
|
derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
|
||||||
overrideAttrs = f: mkDerivation (attrs // f attrs);
|
overrideAttrs = f: mkTmuxPlugin (attrs // f attrs);
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDerivation = a@{
|
mkTmuxPlugin = a@{
|
||||||
pluginName,
|
pluginName,
|
||||||
rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
|
rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
|
||||||
namePrefix ? "tmuxplugin-",
|
namePrefix ? "tmuxplugin-",
|
||||||
@ -50,10 +49,7 @@ let
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
|
battery = mkTmuxPlugin {
|
||||||
inherit mkDerivation;
|
|
||||||
|
|
||||||
battery = mkDerivation {
|
|
||||||
pluginName = "battery";
|
pluginName = "battery";
|
||||||
version = "unstable-2019-07-04";
|
version = "unstable-2019-07-04";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -64,7 +60,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
continuum = mkDerivation {
|
continuum = mkTmuxPlugin {
|
||||||
pluginName = "continuum";
|
pluginName = "continuum";
|
||||||
version = "unstable-2020-10-16";
|
version = "unstable-2020-10-16";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -94,7 +90,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
copycat = mkDerivation {
|
copycat = mkTmuxPlugin {
|
||||||
pluginName = "copycat";
|
pluginName = "copycat";
|
||||||
version = "unstable-2020-01-09";
|
version = "unstable-2020-01-09";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -105,7 +101,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu = mkDerivation {
|
cpu = mkTmuxPlugin {
|
||||||
pluginName = "cpu";
|
pluginName = "cpu";
|
||||||
version = "unstable-2020-07-25";
|
version = "unstable-2020-07-25";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -116,7 +112,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ctrlw = mkDerivation rec {
|
ctrlw = mkTmuxPlugin rec {
|
||||||
pluginName = "ctrlw";
|
pluginName = "ctrlw";
|
||||||
version = "0.1.1";
|
version = "0.1.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -127,7 +123,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
dracula = mkDerivation rec {
|
dracula = mkTmuxPlugin rec {
|
||||||
pluginName = "dracula";
|
pluginName = "dracula";
|
||||||
version = "unstable-2021-02-18";
|
version = "unstable-2021-02-18";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -145,7 +141,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fingers = mkDerivation rec {
|
fingers = mkTmuxPlugin rec {
|
||||||
pluginName = "fingers";
|
pluginName = "fingers";
|
||||||
rtpFilePath = "tmux-fingers.tmux";
|
rtpFilePath = "tmux-fingers.tmux";
|
||||||
version = "1.0.1";
|
version = "1.0.1";
|
||||||
@ -159,7 +155,7 @@ in rec {
|
|||||||
dependencies = [ pkgs.gawk ];
|
dependencies = [ pkgs.gawk ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fpp = mkDerivation {
|
fpp = mkTmuxPlugin {
|
||||||
pluginName = "fpp";
|
pluginName = "fpp";
|
||||||
version = "unstable-2016-03-08";
|
version = "unstable-2016-03-08";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -174,7 +170,7 @@ in rec {
|
|||||||
dependencies = [ pkgs.fpp ];
|
dependencies = [ pkgs.fpp ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fzf-tmux-url = mkDerivation {
|
fzf-tmux-url = mkTmuxPlugin {
|
||||||
pluginName = "fzf-tmux-url";
|
pluginName = "fzf-tmux-url";
|
||||||
rtpFilePath = "fzf-url.tmux";
|
rtpFilePath = "fzf-url.tmux";
|
||||||
version = "unstable-2019-12-02";
|
version = "unstable-2019-12-02";
|
||||||
@ -186,7 +182,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gruvbox = mkDerivation {
|
gruvbox = mkTmuxPlugin {
|
||||||
pluginName = "gruvbox";
|
pluginName = "gruvbox";
|
||||||
rtpFilePath = "gruvbox-tpm.tmux";
|
rtpFilePath = "gruvbox-tpm.tmux";
|
||||||
version = "unstable-2019-05-05";
|
version = "unstable-2019-05-05";
|
||||||
@ -198,7 +194,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
jump = mkDerivation {
|
jump = mkTmuxPlugin {
|
||||||
pluginName = "jump";
|
pluginName = "jump";
|
||||||
version = "2020-06-26";
|
version = "2020-06-26";
|
||||||
rtpFilePath = "tmux-jump.tmux";
|
rtpFilePath = "tmux-jump.tmux";
|
||||||
@ -222,7 +218,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
logging = mkDerivation {
|
logging = mkTmuxPlugin {
|
||||||
pluginName = "logging";
|
pluginName = "logging";
|
||||||
version = "unstable-2019-04-19";
|
version = "unstable-2019-04-19";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -233,7 +229,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
net-speed = mkDerivation {
|
net-speed = mkTmuxPlugin {
|
||||||
pluginName = "net-speed";
|
pluginName = "net-speed";
|
||||||
version = "unstable-2018-12-02";
|
version = "unstable-2018-12-02";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -244,7 +240,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nord = mkDerivation rec {
|
nord = mkTmuxPlugin rec {
|
||||||
pluginName = "nord";
|
pluginName = "nord";
|
||||||
version = "0.3.0";
|
version = "0.3.0";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
@ -255,7 +251,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
maildir-counter = mkDerivation {
|
maildir-counter = mkTmuxPlugin {
|
||||||
pluginName = "maildir-counter";
|
pluginName = "maildir-counter";
|
||||||
version = "unstable-2016-11-25";
|
version = "unstable-2016-11-25";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -266,7 +262,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
online-status = mkDerivation {
|
online-status = mkTmuxPlugin {
|
||||||
pluginName = "online-status";
|
pluginName = "online-status";
|
||||||
version = "unstable-2018-11-30";
|
version = "unstable-2018-11-30";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -277,7 +273,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
open = mkDerivation {
|
open = mkTmuxPlugin {
|
||||||
pluginName = "open";
|
pluginName = "open";
|
||||||
version = "unstable-2019-12-02";
|
version = "unstable-2019-12-02";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -288,7 +284,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
onedark-theme = mkDerivation {
|
onedark-theme = mkTmuxPlugin {
|
||||||
pluginName = "onedark-theme";
|
pluginName = "onedark-theme";
|
||||||
rtpFilePath = "tmux-onedark-theme.tmux";
|
rtpFilePath = "tmux-onedark-theme.tmux";
|
||||||
version = "unstable-2020-06-07";
|
version = "unstable-2020-06-07";
|
||||||
@ -300,7 +296,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pain-control = mkDerivation {
|
pain-control = mkTmuxPlugin {
|
||||||
pluginName = "pain-control";
|
pluginName = "pain-control";
|
||||||
version = "unstable-2020-02-18";
|
version = "unstable-2020-02-18";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -311,7 +307,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
plumb = mkDerivation rec {
|
plumb = mkTmuxPlugin rec {
|
||||||
pluginName = "plumb";
|
pluginName = "plumb";
|
||||||
version = "0.1.1";
|
version = "0.1.1";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -325,7 +321,7 @@ in rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
power-theme = mkDerivation {
|
power-theme = mkTmuxPlugin {
|
||||||
pluginName = "power";
|
pluginName = "power";
|
||||||
rtpFilePath = "tmux-power.tmux";
|
rtpFilePath = "tmux-power.tmux";
|
||||||
version = "unstable-2020-11-18";
|
version = "unstable-2020-11-18";
|
||||||
@ -337,7 +333,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
prefix-highlight = mkDerivation {
|
prefix-highlight = mkTmuxPlugin {
|
||||||
pluginName = "prefix-highlight";
|
pluginName = "prefix-highlight";
|
||||||
version = "unstable-2020-03-26";
|
version = "unstable-2020-03-26";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -348,7 +344,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
resurrect = mkDerivation {
|
resurrect = mkTmuxPlugin {
|
||||||
pluginName = "resurrect";
|
pluginName = "resurrect";
|
||||||
version = "unstable-2020-09-18";
|
version = "unstable-2020-09-18";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -385,7 +381,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sensible = mkDerivation {
|
sensible = mkTmuxPlugin {
|
||||||
pluginName = "sensible";
|
pluginName = "sensible";
|
||||||
version = "unstable-2017-09-05";
|
version = "unstable-2017-09-05";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -394,12 +390,12 @@ in rec {
|
|||||||
rev = "e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5";
|
rev = "e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5";
|
||||||
sha256 = "1z8dfbwblrbmb8sgb0k8h1q0dvfdz7gw57las8nwd5gj6ss1jyvx";
|
sha256 = "1z8dfbwblrbmb8sgb0k8h1q0dvfdz7gw57las8nwd5gj6ss1jyvx";
|
||||||
};
|
};
|
||||||
postInstall = lib.optionalString pkgs.stdenv.isDarwin ''
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||||
sed -e 's:reattach-to-user-namespace:${reattach-to-user-namespace}/bin/reattach-to-user-namespace:g' -i $target/sensible.tmux
|
sed -e 's:reattach-to-user-namespace:${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace:g' -i $target/sensible.tmux
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionist = mkDerivation {
|
sessionist = mkTmuxPlugin {
|
||||||
pluginName = "sessionist";
|
pluginName = "sessionist";
|
||||||
version = "unstable-2017-12-03";
|
version = "unstable-2017-12-03";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -410,7 +406,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sidebar = mkDerivation {
|
sidebar = mkTmuxPlugin {
|
||||||
pluginName = "sidebar";
|
pluginName = "sidebar";
|
||||||
version = "unstable-2018-11-30";
|
version = "unstable-2018-11-30";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -421,7 +417,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sysstat = mkDerivation {
|
sysstat = mkTmuxPlugin {
|
||||||
pluginName = "sysstat";
|
pluginName = "sysstat";
|
||||||
version = "unstable-2017-12-12";
|
version = "unstable-2017-12-12";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -432,7 +428,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
tilish = mkDerivation {
|
tilish = mkTmuxPlugin {
|
||||||
pluginName = "tilish";
|
pluginName = "tilish";
|
||||||
version = "2020-08-12";
|
version = "2020-08-12";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -451,7 +447,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
tmux-colors-solarized = mkDerivation {
|
tmux-colors-solarized = mkTmuxPlugin {
|
||||||
pluginName = "tmuxcolors";
|
pluginName = "tmuxcolors";
|
||||||
version = "unstable-2019-07-14";
|
version = "unstable-2019-07-14";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -462,7 +458,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
tmux-fzf = mkDerivation {
|
tmux-fzf = mkTmuxPlugin {
|
||||||
pluginName = "tmux-fzf";
|
pluginName = "tmux-fzf";
|
||||||
rtpFilePath = "main.tmux";
|
rtpFilePath = "main.tmux";
|
||||||
version = "unstable-2020-12-07";
|
version = "unstable-2020-12-07";
|
||||||
@ -498,7 +494,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
urlview = mkDerivation {
|
urlview = mkTmuxPlugin {
|
||||||
pluginName = "urlview";
|
pluginName = "urlview";
|
||||||
version = "unstable-2016-01-06";
|
version = "unstable-2016-01-06";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -513,7 +509,7 @@ in rec {
|
|||||||
dependencies = [ pkgs.urlview ];
|
dependencies = [ pkgs.urlview ];
|
||||||
};
|
};
|
||||||
|
|
||||||
vim-tmux-focus-events = mkDerivation {
|
vim-tmux-focus-events = mkTmuxPlugin {
|
||||||
pluginName = "vim-tmux-focus-events";
|
pluginName = "vim-tmux-focus-events";
|
||||||
version = "unstable-2020-10-05";
|
version = "unstable-2020-10-05";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -532,7 +528,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vim-tmux-navigator = mkDerivation {
|
vim-tmux-navigator = mkTmuxPlugin {
|
||||||
pluginName = "vim-tmux-navigator";
|
pluginName = "vim-tmux-navigator";
|
||||||
rtpFilePath = "vim-tmux-navigator.tmux";
|
rtpFilePath = "vim-tmux-navigator.tmux";
|
||||||
version = "unstable-2019-12-10";
|
version = "unstable-2019-12-10";
|
||||||
@ -544,7 +540,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
yank = mkDerivation {
|
yank = mkTmuxPlugin {
|
||||||
pluginName = "yank";
|
pluginName = "yank";
|
||||||
version = "unstable-2019-12-02";
|
version = "unstable-2019-12-02";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@ -554,5 +550,4 @@ in rec {
|
|||||||
sha256 = "1zg9k8yk1iw01vl8m44w4sv20lln4l0lq9dafc09lxmgxm9dllj4";
|
sha256 = "1zg9k8yk1iw01vl8m44w4sv20lln4l0lq9dafc09lxmgxm9dllj4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user