Skip to content

Commit

Permalink
tmux-plugins: fix the fzf-tmux-url derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
kalbasit committed Aug 6, 2018
1 parent 9934f0b commit 9bf0eba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/misc/tmux-plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
let
rtpPath = "share/tmux-plugins";

addRtp = path: pluginName: attrs: derivation:
derivation // { rtp = "${derivation}/${path}/${builtins.replaceStrings ["-"] ["_"] pluginName}.tmux"; } // {
addRtp = path: rtpFilePath: attrs: derivation:
derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
overrideAttrs = f: buildTmuxPlugin (attrs // f attrs);
};

buildTmuxPlugin = a@{
pluginName,
rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
namePrefix ? "tmuxplugin-",
src,
unpackPhase ? "",
Expand All @@ -22,7 +23,7 @@ let
dependencies ? [],
...
}:
addRtp "${rtpPath}/${path}" pluginName a (stdenv.mkDerivation (a // {
addRtp "${rtpPath}/${path}" rtpFilePath a (stdenv.mkDerivation (a // {
name = namePrefix + pluginName;

inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
Expand Down Expand Up @@ -102,6 +103,7 @@ in rec {

fzf-tmux-url = buildTmuxPluginFrom2Nix {
pluginName = "fzf-tmux-url";
rtpFilePath = "fzf-url.tmux";
src = fetchgit {
url = "https://github.com/wfxr/tmux-fzf-url";
rev = "ecd518eec1067234598c01e655b048ff9d06ef2f";
Expand Down

0 comments on commit 9bf0eba

Please sign in to comment.