anchor.diff:      ${if compilePorts then ''
       echo "{plugins, [pc]}." >> rebar.config
       '' else ''''}
  +
  +    mkdir -p _build/default/{lib,plugins}/ ./.cache/rebar3/hex/default/
  +    zcat ${registrySnapshot}/registry.ets.gz > .cache/rebar3/hex/default/registry
   
       ${postPatch}
     '';
  
positive.code:     };
    in ''
      runHook preConfigure
      mkdir -p _build/default/{lib,plugins}/
      ${concatMapStrings (dep: ''
        header "linking erlang dependency ${dep}"
        ln -s "${dep}" "_build/default/lib/${dep.packageName}"
  
negative.code:   # this hermetic
    buildPhase = ''
      runHook preBuild
      HOME=. rebar3 compile
      ${if compilePorts then ''
      HOME=. rebar3 pc compile
      '' else ''''}
  