tmux-plugins: fix the fzf-tmux-url derivation

This commit is contained in:
Wael M. Nasreddine 2018-08-06 10:13:01 -07:00
parent 9934f0bb51
commit 9bf0ebac7e
No known key found for this signature in database
GPG key ID: 82AE0A31B33CEFCF

View file

@ -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 ? "",
@ -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;
@ -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";