Neovim: Two derivations built

I’m overriding the package programs.neovim uses with the one the overlay on GitHub - neovim/neovim: Vim-fork focused on extensibility and usability defines.

Now when building my configuration I see that not only neovim-unwrapped-master (the one I’m aiming for I guess) is being built but also neovim-unwrapped.

The build of neovim-unwrapped derivation has an error due to this

/build/source/src/nvim/terminal.c:850:32: error: incompatible type for argument 2 of ‘buf_set_term_title’
850 | buf_set_term_title(buf, val->string);
| ~^~~~~~
| |
| VTermStringFragment {aka struct }

latter which also seems to be the reason neovim/neovim have a newer version for libvterm and for me is the reason to use their flake as input and overlay to replace my neovim.

I want to understand this two derivations thing but can not get my head around it.

Here is my config at the concerned revision 6c2d2288568c73b7be7fdbd161c5d4d3caa882dd

I think I caught the error: I was following the neovim-flake and at the same time using the programs.neovim.package = pkgs.neovim-nightly; attribute and also applying the overlay neovim-flake provides by putting the former on my overlays list something like overlays = [ inputs.neovim-flake.overlay ];.

What I could have done instead was following concerned flake and in one of my existing overlays only rewriting the attribute neovim as inherit (inputs.neovim-flake.packages.${pkgs.stdenv.hostPlatform.system}) neovim; (or even inherit (inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}) neovim; when following neovim-nightly-overlay flake input).

Then a simple programs.neovim.package = pkgs.neovim; should take just this derivation overwritten above.

Sorry if all of this is obvious or still misconstrued I am still starting.