Here I update the fzf-vim Vim plugin in pkgs/misc/vim-plugins/generated.nix automatically.
To do this, I just position the cursor on a derivation and press space, u, update-nix-fetchgit calls nix-prefetch-git and updates the nix expression with the new revision and hash and version.