How to access `pkgs` after loading flake in `nix repl`?

I’d like to try out some functions from nixpkgs, for that I started nix repl:

> nix repl
nix-repl> :lf stable # "stable" is 'stable.url = "github:nixos/nixpkgs/nixos-25.11";'
nix-repl> pkgs
error: undefined variable 'pkgs'
       at «string»:1:1:
            1| pkgs
             | ^

How can I access pkgs?

nix-repl> inputs
{ }

Sorry.

pkgs = legacyPackages.${builtins.currentSystem};
1 Like

No need to apologize.

Thank you!

1 Like