anchor.diff:      runHook postInstall
     '';
   
  -  doInstallCheck = doCheck;
  -  doCheck = false;
  +  # We run all tests after software has been installed since that is
  +  # a common idiom in Python
  +  doInstallCheck = doInstallCheck;
  +
     installCheckPhase = attrs.checkPhase or ''
       runHook preCheck
       ${python.interpreter} nix_run_setup.py test
  
positive.code: , buildInputs ? []
  
  # propagate build dependencies so in case we have A -> B -> C,
  # C can import propagated packages by A
  , propagatedBuildInputs ? []
  
  # passed to "python setup.py build"
  # https://github.com/pypa/pip/issues/881
  , setupPyBuildFlags ? []
  
  
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
  