Skip to content

Commit

Permalink
buildVimPlugin: enable structuredAttrs
Browse files Browse the repository at this point in the history
it's a cool feature, let's enable it before release to find issues early

the neovimRequireCheckHook needed changes since now 'dependencies' is
seen as a bash array instead of a string:
1. we first expand it as a string
2. we replace ' ' with ',' (as before)
  • Loading branch information
teto committed Sep 23, 2024
1 parent 37575b3 commit e9f4eb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
drv = stdenv.mkDerivation (attrs // {
name = lib.warnIf (attrs ? vimprefix) "The 'vimprefix' is now hardcoded in toVimPlugin" name;

__structuredAttrs = true;
inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;

installPhase = ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#shellcheck shell=bash
# Setup hook for checking whether Python imports succeed
echo "Sourcing neovim-require-check-hook.sh"

Expand All @@ -9,8 +10,10 @@ neovimRequireCheckHook () {

# editorconfig-checker-disable
export HOME="$TMPDIR"

local deps="${dependencies[*]}"
@nvimBinary@ -es --headless -n -u NONE -i NONE --clean -V1 \
--cmd "set rtp+=$out,${dependencies// /,}" \
--cmd "set rtp+=$out,${deps// /,}" \
--cmd "lua require('$nvimRequireCheck')"
fi
}
Expand Down

0 comments on commit e9f4eb9

Please sign in to comment.