anchor.diff:        tool icestorm "icepack" //
         tool trellis "ecppack";
     in ''
  -    substituteInPlace setup.py \
  -      --replace 'versioneer.get_version()' '"${realVersion}"'
  -
       substituteInPlace nmigen/_toolchain.py \
         --replace 'overrides = {}' \
                   'overrides = ${builtins.toJSON toolchainOverrides}'
  +  '';
  +
  +  preBuild = ''
  +    export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
     '';
   
     meta = with lib; {
  
positive.code: 
  buildPythonPackage rec {
    pname = "nmigen";
    version = "unstable-2019-08-31";
    realVersion = lib.substring 0 7 src.rev;
  
    src = fetchFromGitHub {
      owner = "m-labs";
      repo = "nmigen";
      rev = "2e206220462c67aa6ae97f7515a2191440fd61b3";
      sha256 = "0y3w6vd493jqm9b8ppgwzs02v1al8w1n5gylljlsw70ci7fyk4qa";
    };
  
    disabled = pythonOlder "3.6";
  
    propagatedBuildInputs = [ pyvcd bitarray jinja2 ];
  
    checkInputs = [ yosys yices ];
  
  
negative.code: , buildPythonPackage
  , pythonOlder
  , fetchFromGitHub
  , setuptools
  , setuptools_scm
  , pyvcd
  , bitarray
  , jinja2
  