Some nix commands not working because of overlay

$ nix-env -qaA nixpkgs.python3.pkgs.Keras
error: attribute 'nixpkgs' in selection path 'nixpkgs.python3.pkgs.Keras' not found

So I’m using nixos:

$ nix-env -qaA nixos.python3.pkgs.Keras
python3.8-Keras-2.3.1

Which is strange since in Python it show the 2.2.4:

$ python3 -c 'import keras; print(keras.__version__)'
Using Theano backend.
2.2.4

Adding the attribute name = “${pname}-${version}” to the Keras overlay it show correctly:

$ nix-env -qaA nixos.python3.pkgs.Keras
Keras-2.2.4
$ nix eval nixpkgs.python3.pkgs.Keras.name
"Keras-2.2.4"
$ nix-env --show-trace -qa torch
error: attribute 'Keras' missing, at /home/thiago/.config/nixpkgs/overlays/python_overlays.nix:10:11

Thanks again!