anchor.diff:      };
     in ''
       runHook preConfigure
  -    mkdir -p _build/default/{lib,plugins}/
       ${concatMapStrings (dep: ''
         header "linking erlang dependency ${dep}"
         ln -s "${dep}" "_build/default/lib/${dep.packageName}"
  
positive.code: { stdenv, erlang, rebar3, openssl, libyaml, fetchurl }:
  
  { name, version, sha256
  , hexPkg ? name
  
negative.code: 
    buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
  
    postPatch = let
      registrySnapshot = fetchFromGitHub {
        owner = "gleber";
        repo = "hex-pm-registry-snapshots";
        rev = "48147b0";
        sha256 = "0ibfnhrhbka4n6wkhs99fpy3sjab54ip37jgvx2hcfhfr4pxhbxw";
      };
    in ''
      rm -f rebar rebar3
      if [ -e "src/${name}.app.src" ]; then
        sed -i -e 's/{ *vsn *,[^}]*}/{vsn, "${version}"}/' "src/${name}.app.src"
  