tmux-plugins: fix the fzf-tmux-url derivation
This commit is contained in:
parent
9934f0bb51
commit
9bf0ebac7e
|
@ -3,13 +3,14 @@
|
||||||
let
|
let
|
||||||
rtpPath = "share/tmux-plugins";
|
rtpPath = "share/tmux-plugins";
|
||||||
|
|
||||||
addRtp = path: pluginName: attrs: derivation:
|
addRtp = path: rtpFilePath: attrs: derivation:
|
||||||
derivation // { rtp = "${derivation}/${path}/${builtins.replaceStrings ["-"] ["_"] pluginName}.tmux"; } // {
|
derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
|
||||||
overrideAttrs = f: buildTmuxPlugin (attrs // f attrs);
|
overrideAttrs = f: buildTmuxPlugin (attrs // f attrs);
|
||||||
};
|
};
|
||||||
|
|
||||||
buildTmuxPlugin = a@{
|
buildTmuxPlugin = a@{
|
||||||
pluginName,
|
pluginName,
|
||||||
|
rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
|
||||||
namePrefix ? "tmuxplugin-",
|
namePrefix ? "tmuxplugin-",
|
||||||
src,
|
src,
|
||||||
unpackPhase ? "",
|
unpackPhase ? "",
|
||||||
|
@ -22,7 +23,7 @@ let
|
||||||
dependencies ? [],
|
dependencies ? [],
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
addRtp "${rtpPath}/${path}" pluginName a (stdenv.mkDerivation (a // {
|
addRtp "${rtpPath}/${path}" rtpFilePath a (stdenv.mkDerivation (a // {
|
||||||
name = namePrefix + pluginName;
|
name = namePrefix + pluginName;
|
||||||
|
|
||||||
inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
|
inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
|
||||||
|
@ -102,6 +103,7 @@ in rec {
|
||||||
|
|
||||||
fzf-tmux-url = buildTmuxPluginFrom2Nix {
|
fzf-tmux-url = buildTmuxPluginFrom2Nix {
|
||||||
pluginName = "fzf-tmux-url";
|
pluginName = "fzf-tmux-url";
|
||||||
|
rtpFilePath = "fzf-url.tmux";
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/wfxr/tmux-fzf-url";
|
url = "https://github.com/wfxr/tmux-fzf-url";
|
||||||
rev = "ecd518eec1067234598c01e655b048ff9d06ef2f";
|
rev = "ecd518eec1067234598c01e655b048ff9d06ef2f";
|
||||||
|
|
Loading…
Reference in New Issue