about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorWael M. Nasreddine <wael.nasreddine@gmail.com>2018-08-06 12:08:59 -0700
committerWael M. Nasreddine <wael.nasreddine@gmail.com>2018-08-06 12:17:45 -0700
commite8a5f6c2255208fe57cc089e630647e5a16830f1 (patch)
treee0f7aeb384d7617fd08ca83064e38ae73f6f63fd /pkgs/misc
parentb234f07762295e9766708711c6921290e461fafe (diff)
downloadnixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.tar
nixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.tar.gz
nixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.tar.bz2
nixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.tar.lz
nixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.tar.xz
nixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.tar.zst
nixlib-e8a5f6c2255208fe57cc089e630647e5a16830f1.zip
tmuxPlugins: expose mkDerivation for creating a TMUX plugins
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/tmux-plugins/default.nix53
1 files changed, 25 insertions, 28 deletions
diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix
index fc587d950c1c..fb95b667d864 100644
--- a/pkgs/misc/tmux-plugins/default.nix
+++ b/pkgs/misc/tmux-plugins/default.nix
@@ -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";