modules/default.nix: make patches work on built plugins

This commit is contained in:
Gerg-L 2024-07-18 19:00:49 -04:00
parent 9c93e9a9c0
commit 977939a167
No known key found for this signature in database
2 changed files with 13 additions and 7 deletions

View file

@ -25,8 +25,6 @@ Release notes for release 0.7
[vim.ui.smartcolumn.setupOpts.custom_colorcolumn](#opt-vim.ui.smartcolumn.setupOpts.custom_colorcolumn) [vim.ui.smartcolumn.setupOpts.custom_colorcolumn](#opt-vim.ui.smartcolumn.setupOpts.custom_colorcolumn)
using the wrong type `int` instead of the expected type `string`. using the wrong type `int` instead of the expected type `string`.
- Fix unused src and version attributes in `buildPlug`.
[horriblename](https://github.com/horriblename): [horriblename](https://github.com/horriblename):
- Fix broken treesitter-context keybinds in visual mode - Fix broken treesitter-context keybinds in visual mode

View file

@ -36,11 +36,19 @@ inputs: {
buildPlug = {pname, ...} @ attrs: let buildPlug = {pname, ...} @ attrs: let
src = getAttr ("plugin-" + pname) inputs; src = getAttr ("plugin-" + pname) inputs;
in in
pkgs.runCommand "${pname}-${src.shortRev or src.shortDirtyRev or "dirty"}" attrs pkgs.stdenvNoCC.mkDerivation ({
'' inherit src;
version = src.shortRev or src.shortDirtyRev or "dirty";
installPhase = ''
runHook preInstall
mkdir -p $out mkdir -p $out
cp -r ${src}/. $out cp -r . $out
runHook postInstall
''; '';
}
// attrs);
noBuildPlug = {pname, ...} @ attrs: let noBuildPlug = {pname, ...} @ attrs: let
input = getAttr ("plugin-" + pname) inputs; input = getAttr ("plugin-" + pname) inputs;