anchor.diff:    patchPhase = with builtins; ''
       substituteInPlace ./CMakeLists.txt \
         --replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
  +
  +    # use PyPy for icestorm if enabled
  +    substituteInPlace ./ice40/family.cmake \
  +      --replace ''\'''${PYTHON_EXECUTABLE}' '${icestorm.pythonInterp}'
     '';
   
   
  
positive.code:       "-DUSE_OPENMP=ON"
        # warning: high RAM usage
        "-DSERIALIZE_CHIPDB=OFF"
        # use PyPy for icestorm if enabled
        "-DPYTHON_EXECUTABLE=${icestorm.pythonInterp}"
      ]
      ++ (lib.optional (!enableGui) "-DBUILD_GUI=OFF")
      ++ (lib.optional (enableGui && stdenv.isDarwin)
  
negative.code: in
  with stdenv; mkDerivation rec {
    pname = "nextpnr";
    version = "2019.09.28";
  
    src = fetchFromGitHub {
      owner  = "yosyshq";
      repo   = "nextpnr";
      rev    = "7cd1e0495122847611b17a8d1f007d97a05b288c";
      sha256 = "13y739l92plb22g73jf35pyh3y94b2vq0i65r9c31r2rb7fw4bbl";
      fetchSubmodules = true;
    };
  
    nativeBuildInputs
  