anchor.diff: -{ stdenv, lib, go, procps, removeReferencesTo, fetchFromGitHub }:
  +{ buildGoPackage, fetchpatch, stdenv, lib, procps, fetchFromGitHub }:
   
   let
  -  common = { stname, target, patches ? [], postInstall ? "" }:
  -    stdenv.mkDerivation rec {
  +  common = { stname, target, postInstall ? "" }:
  +    buildGoPackage rec {
         version = "0.14.52";
         name = "${stname}-${version}";
   
  
positive.code:   syncthing-cli = common {
      stname = "syncthing-cli";
  
      patches = [ ./add-stcli-target.patch ];
      target = "stcli";
    };
  
  
negative.code:         sha256 = "1qzzbqfyjqlgzysyf6dr0xsm3gn35irmllxjjd94v169swvkk5kd";
        };
  
        goPackagePath = "github.com/syncthing/syncthing";
  
        patches = [
          ./add-stcli-target.patch
          (fetchpatch {
            url = "https://github.com/syncthing/syncthing/commit/e7072feeb7669948c3e43f55d21aec15481c33ba.patch";
            sha256 = "1pcybww2vdx45zhd1sd53v7fp40vfgkwqgy8flv7hxw2paq8hxd4";
          })
        ];
        BUILD_USER="nix";
        BUILD_HOST="nix";
  
        buildPhase = ''
          runHook preBuild
          pushd go/src/${goPackagePath}
          go run build.go -no-upgrade -version v${version} build ${target}
          popd
          runHook postBuild
        '';
  
        installPhase = ''
          pushd go/src/${goPackagePath}
          runHook preInstall
          install -Dm755 ${target} $bin/bin/${target}
          runHook postInstall
          popd
        '';
  
        inherit postInstall;
  
        meta = with lib; {
          homepage = https://www.syncthing.net/;
  