your python.withPackages … might have glob2, but the derivation that’s trying to add pytest-bdd doesn’t… you’ll want to add propagatedBuildInputs:
src = python37.pkgs.fetchPypi {
inherit pname version;
sha256 = "1ibyr40g3p6xbx1m59as3s9spyadz8wyc7zwqyzibphrw4pkvrqp";
};
propagatedBuildInputs = with python37.pkgs [ pytest glob2 Mako parse parse_type py six ];
the other option is to just do python37.withPackages....
which includes virtualenv, create a virtual environment, and then just use pip to install missing packages locally