anchor.diff:    '';
   
     # Tests must be run in the build directory
  -  checkPhase = ''
  -    cd build/lib.*
  -    pytest
  +  preCheck = ''
  +    pushd build/lib.*
  +  '';
  +  postCheck = ''
  +    popd
     '';
   
     meta = with lib; {
  
positive.code:     })
    ];
  
    nativeBuildInputs = [ astropy-helpers ];
  
    checkInputs = [ pytest pytest-astropy ];
  
    # Disable automatic update of the astropy-helper module
    postPatch = ''
  
negative.code:   pname = "pyregion";
    version = "2.0";
  
    # pypi src contains cython-produced .c files which don't compile
    # with python3.9
    src = fetchFromGitHub {
      owner = "astropy";
      repo = pname;
      rev = version;
      sha256 = "1izar7z606czcyws9s8bjbpb1xhqshpv5009rlpc92hciw7jv4kg";
    };
  
    propagatedBuildInputs = [
      pyparsing
      numpy
      astropy
    ];
  
  