`override` function no longer accepts parameter, in Python env

Hello everyone, how are you?

I’m trying to solve an issue I have in a development environment using mkShell.

In this environment, I set up a development environment with Python packages like this (see Add an "addPackages" utility to python buildEnv by trevorcook · Pull Request #97467 · NixOS/nixpkgs · GitHub):

with import (fetchTarball "channel:nixos-20.03") {};

with python3.pkgs;

let
  env = python3.withPackages(ps: with ps; [ pytest ]);  # Equivalent to the commented `buildEnv.override`
  env2 = env.override (old: {
    extraLibs = old.extraLibs ++ [ numpy ];
  });
in env2

However, the override function no longer accepts this parameter. So I’m unable to add extra packages after the environment is built.

Does anyone have any ideas?

What error are you getting?

After producing an example outside of flake, I could solve it and sent a pull request fixing the root cause of my error: