forked from mirrors/nixpkgs
Merge pull request #207440 from figsoda/vim
vimUtils.buildVimPlugin: set meta.platforms
This commit is contained in:
commit
2819a437f7
|
@ -1,9 +1,6 @@
|
|||
{ lib, stdenv
|
||||
{ lib
|
||||
, stdenv
|
||||
, rtpPath
|
||||
, vim
|
||||
, vimCommandCheckHook
|
||||
, vimGenDocHook
|
||||
, neovimRequireCheckHook
|
||||
, toVimPlugin
|
||||
}:
|
||||
|
||||
|
@ -14,39 +11,46 @@ rec {
|
|||
overrideAttrs = f: addRtp (drv.overrideAttrs f);
|
||||
};
|
||||
|
||||
buildVimPlugin = attrs@{
|
||||
name ? "${attrs.pname}-${attrs.version}",
|
||||
namePrefix ? "vimplugin-",
|
||||
src,
|
||||
unpackPhase ? "",
|
||||
configurePhase ? "",
|
||||
buildPhase ? "",
|
||||
preInstall ? "",
|
||||
postInstall ? "",
|
||||
path ? ".",
|
||||
addonInfo ? null,
|
||||
...
|
||||
}:
|
||||
let drv = stdenv.mkDerivation (attrs // {
|
||||
name = namePrefix + name;
|
||||
buildVimPlugin =
|
||||
{ name ? "${attrs.pname}-${attrs.version}"
|
||||
, namePrefix ? "vimplugin-"
|
||||
, src
|
||||
, unpackPhase ? ""
|
||||
, configurePhase ? ""
|
||||
, buildPhase ? ""
|
||||
, preInstall ? ""
|
||||
, postInstall ? ""
|
||||
, path ? "."
|
||||
, addonInfo ? null
|
||||
, meta ? { }
|
||||
, ...
|
||||
}@attrs:
|
||||
let
|
||||
drv = stdenv.mkDerivation (attrs // {
|
||||
name = namePrefix + name;
|
||||
|
||||
inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
|
||||
inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
target=$out/${rtpPath}/${path}
|
||||
mkdir -p $out/${rtpPath}
|
||||
cp -r . $target
|
||||
target=$out/${rtpPath}/${path}
|
||||
mkdir -p $out/${rtpPath}
|
||||
cp -r . $target
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
in addRtp (toVimPlugin drv);
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.all;
|
||||
} // meta;
|
||||
});
|
||||
in
|
||||
addRtp (toVimPlugin drv);
|
||||
|
||||
buildVimPluginFrom2Nix = attrs: buildVimPlugin ({
|
||||
# vim plugins may override this
|
||||
buildPhase = ":";
|
||||
configurePhase =":";
|
||||
configurePhase = ":";
|
||||
} // attrs);
|
||||
}
|
||||
|
|
|
@ -1151,6 +1151,8 @@ self: super: {
|
|||
pname = "vim-markdown-composer-bin";
|
||||
inherit (super.vim-markdown-composer) src version;
|
||||
cargoSha256 = "sha256-Vie8vLTplhaVU4E9IohvxERfz3eBpd62m8/1Ukzk8e4=";
|
||||
# tests require network access
|
||||
doCheck = false;
|
||||
};
|
||||
in
|
||||
super.vim-markdown-composer.overrideAttrs (old: {
|
||||
|
|
|
@ -391,8 +391,7 @@ rec {
|
|||
} ./neovim-require-check-hook.sh) {};
|
||||
|
||||
inherit (import ./build-vim-plugin.nix {
|
||||
inherit lib stdenv rtpPath vim vimGenDocHook
|
||||
toVimPlugin vimCommandCheckHook neovimRequireCheckHook;
|
||||
inherit lib stdenv rtpPath toVimPlugin;
|
||||
}) buildVimPlugin buildVimPluginFrom2Nix;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue