make: find neovim n the profile using jq

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-22 15:06:46 +03:00
parent 6f0a5fcc30
commit 129bc5c0a0
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -1,8 +1,6 @@
NIX_RUN := nix run .\#
NIX_LOCK := nix flake lock
NEOVIM_INDEX := 4
DEPS_EDITOR := \
nixeovim
@ -57,7 +55,7 @@ rollback:
.PHONY: neovim
neovim:
nix profile upgrade $(NEOVIM_INDEX)
nix profile upgrade $(or $(NEOVIM_INDEX),$(shell nix profile list --json | jq '.elements | to_entries[] | select(.value.attrPath | endswith(".neovim-dev")) | .key'))
.PHONY: init-neovim
init-neovim: