anchor.diff:      runHook postConfigure
     '';
   
  +  # we copy nix_run_setup.py over so it's executed relative to the root of the source
  +  # many project make that assumption
     buildPhase = attrs.buildPhase or ''
       runHook preBuild
       cp ${setuppy} nix_run_setup.py
  
positive.code: 
    # propagate python/setuptools to active setup-hook in nix-shell
    propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
  
    pythonPath = pythonPath;
  
    configurePhase = attrs.configurePhase or ''
      runHook preConfigure
  
negative.code: else
  
  let
    # use setuptools shim (so that setuptools is imported before distutils)
    # pip does the same thing: https://github.com/pypa/pip/pull/3265
    setuppy = ./run_setup.py;
    # For backwards compatibility, let's use an alias
    doInstallCheck = doCheck;
  in
  python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] // {
    name = namePrefix + name;
  
    buildInputs = [ wrapPython bootstrapped-pip ] ++ buildInputs ++ pythonPath
  