anchor.diff: -{ stdenv, fetchFromGitHub, python3, libftdi, pkgconfig }:
  +{ stdenv, fetchFromGitHub
  +, pkgconfig, libftdi
  +, python3, pypy3
  +}:
  +
  +let
  +  pypyCompatible = stdenv.isx86_64; /* pypy3 seems broken on i686 */
  +  pythonPkg      = if pypyCompatible then pypy3 else python3;
  +  pythonInterp   = if pypyCompatible then "pypy3" else "python3";
  +in
   
   stdenv.mkDerivation rec {
     name = "icestorm-${version}";
  
positive.code:   };
  
    nativeBuildInputs = [ pkgconfig ];
    buildInputs = [ python3 libftdi ];
    makeFlags = [ "PREFIX=$(out)" ];
  
    # fix icebox_vlog chipdb path. icestorm issue:
    #   https://github.com/cliffordwolf/icestorm/issues/125
    patchPhase = ''
      substituteInPlace ./icebox/icebox_vlog.py \
        --replace /usr/local/share "$out/share"
    '';
  
    meta = {
  
negative.code:       FPGAs and providing simple tools for analyzing and
        creating bitstream files.
      '';
      homepage    = http://www.clifford.at/icestorm/;
      license     = stdenv.lib.licenses.isc;
      maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ];
      platforms   = stdenv.lib.platforms.linux;
    };
  }
  