anchor.diff: -{ lib, fetchpatch, python3Packages }:
  +{ lib
  +, fetchpatch
  +, fetchFromGitHub
  +, python3
  +}:
   
  -with lib;
  -with python3Packages;
  +let
  +  py = python3.override {
  +    packageOverrides = self: super: {
  +
  +      # Support for later tweepy releases is missing
  +      # https://github.com/louipc/turses/issues/12
  +      tweepy = super.tweepy.overridePythonAttrs (oldAttrs: rec {
  +        version = "3.10.0";
  +
  +        src = fetchFromGitHub {
  +          owner = "tweepy";
  +          repo = "tweepy";
  +          rev = "v${version}";
  +          sha256 = "0k4bdlwjna6f1k19jki4xqgckrinkkw8b9wihzymr1l04rwd05nw";
  +        };
  +        doCheck = false;
  +      });
  +    };
  +  };
  +in
  +with py.pkgs;
   
   buildPythonPackage rec {
     pname = "turses";
  
positive.code:     rm -rf $TMP_TURSES
    '';
  
    postPatch = ''
      sed -i -e 's|urwid==1.3.0|urwid==${getVersion urwid}|' setup.py
      sed -i -e "s|future==0.14.3|future==${getVersion future}|" setup.py
      sed -i -e "s|tweepy==3.3.0|tweepy==${getVersion tweepy}|" setup.py
      sed -i -e "s|config.generate_config_file.assert_called_once()|assert config.generate_config_file.call_count == 1|" tests/test_config.py
      sed -i -e "s|self.observer.update.assert_called_once()|assert self.observer.update.call_count == 1|" tests/test_meta.py
    '';
  
    meta = with lib; {
      homepage = "https://github.com/louipc/turses";
      description = "A Twitter client for the console";
      license = licenses.gpl3;
      maintainers = with maintainers; [ ];
      platforms = platforms.unix;
    };
  
negative.code:     })
    ];
  
    postPatch = ''
      substituteInPlace setup.py \
        --replace "urwid==1.3.0" "urwid" \
        --replace "future==0.14.3" "future" \
        --replace "tweepy==3.3.0" "tweepy"
      substituteInPlace tests/test_config.py \
        --replace "config.generate_config_file.assert_called_once()" "assert config.generate_config_file.call_count == 1"
      substituteInPlace tests/test_meta.py \
        --replace "self.observer.update.assert_called_once()" "assert self.observer.update.call_count == 1"
    '';
  
    checkPhase = ''
      TMP_TURSES=`echo turses-$RANDOM`
      mkdir $TMP_TURSES
  