anchor.diff:      (cd misc && ${protobuf}/bin/protoc --cpp_out ../backends/protobuf/ ./yosys.proto)
   
       if ! grep -q "ABCREV = ${shortAbcRev}" Makefile; then
  -      echo "yosys isn't compatible with the provided abc (${shortAbcRev}), failing."
  +      echo "ERROR: yosys isn't compatible with the provided abc (${shortAbcRev}), failing."
  +      exit 1
  +    fi
  +
  +    if ! grep -q "YOSYS_VER := ${version}" Makefile; then
  +      echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (${version}), failing."
         exit 1
       fi
     '';
   
  +  checkTarget = "test";
     doCheck = true;
     checkInputs = [ verilog ];
   
  
positive.code: , zlib
  }:
  
  stdenv.mkDerivation rec {
    pname   = "yosys";
    version = "2020.10.20";
  
    src = fetchFromGitHub {
      owner  = "YosysHQ";
      repo   = "yosys";
      rev    = "06347b119b08257eff37cdd10ed802e794c1a3cf";
      sha256 = "07058r8095192gwkiy2yyvj9vxv09fcw9bqi2b39wn85lh5kx2k2";
    };
  
    enableParallelBuilding = true;
  
negative.code:   # they just assume that 'yosys-abc' is available -- but it's not installed
    # when using ABCEXTERNAL
    #
    # add a symlink to fake things so that both variants work the same way. this
    # is also needed at build time for the test suite.
    postBuild   = "ln -sfv ${abc-verifier}/bin/abc ./yosys-abc";
    postInstall = "ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc";
  
    meta = with stdenv.lib; {
      description = "Open RTL synthesis framework and tools";
  