anchor.diff:    };
   
     nativeBuildInputs = [ setuptools_scm ];
  -  checkInputs = [ pytest_3 ];
  +  checkInputs = [ pytest ];
  +
  +  # Fix pytest 4 support. See: https://github.com/pytest-dev/apipkg/issues/14
  +  postPatch = ''
  +    substituteInPlace "test_apipkg.py" \
  +      --replace "py.test.ensuretemp('test_apipkg')" "py.path.local('test_apipkg')"
  +  '';
   
     checkPhase = ''
       py.test
  
positive.code: { stdenv, buildPythonPackage, fetchPypi
  , pytest_3, setuptools_scm }:
  
  buildPythonPackage rec {
    pname = "apipkg";
  
negative.code: 
    meta = with stdenv.lib; {
      description = "Namespace control and lazy-import mechanism";
      homepage = "https://github.com/pytest-dev/apipkg";
      license = licenses.mit;
    };
  }
  