Shell comand in nix repl - Import nix pkg from github - usage

Hello,

I would like to do the following shell command in nix repl
nix-prefetch-github --no-prefetch --rev refs/heads/nixos-unstable nixos nixpkgs-channels > ./nix.json