`nix edit` with buildEnv and mkShell

I’ve been happily using nix edit to see the build expression for packages and their options within my default editor. However, when using it with buildEnv or mkShell it doesn’t actually show the calling code but rather those builtin functions’ source themselves. Is there a way to fix that?

Example

This works great

nix edit nixpkgs#vim

This doesn’t show the nix expression I expected:

nix edit github:carlthome/dotfiles#ipython

(I expected to see this)

does it have to do with vim being a toplevel attribute ?

There needs to be a filled meta attribute, as thats what gets the location data stored…

2 Likes