Can an overlay allow me to override python36Packages.rsa

I am trying to use an overlay to solve the fact that python36 packages don’t work anymore. Apparently I need to override an environment variable, and a buildInput. The problem I’m having is that python36Packages.rsa is not a top level package. How do I override it with an overlay?

Bad code:

self: super: {
     python36Packages.rsa = super.python36Packages.override({LC_ALL="en_US.utf8"; }).overrideAttrs(oa: buildInput=super.pkgs.glibcLocales; });

The problem I am having is that the package isn;t a top level package – so I know that code’s not right, but I don’t know what the code should be.

Not sure what you are trying to do but I think you could use this snippet:

self: super: with self; {
  python36Packages = super.python36Packages.override {
    overrides = pself: psuper: {
      rsa = psuper.rsa.override { ... };