Evaluating an expression on a flake via cli

I’m looking for a way to search through available outputs for a flake nix-vscode-extensions. I found how to do it via repl:

nix-repl> :lf .
nix-repl> inputs.nix-vscode-extensions.extensions.x86_64-linux.open-vsx. # press tab

But I don’t see how I could do that in a single command… I imagined something like this

nix repl --flake . -e 'inputs.nix-vscode-extensions.extensions.x86_64-linux.open-vsx'

Or nix eval

but I can’t find a possibility in the man pages of the two commands :frowning_face:

1 Like
nix eval --impure --expr 'builtins.attrNames (builtins.getFlake (toString ./.)).inputs.nix-vscode-extensions.extensions.x86_64-linux.open-vsx'


nix eval github:nix-community/nix-vscode-extensions#extensions.x86_64-linux.open-vsx.<tab>
1 Like