anchor.diff:  { stdenv, fetchurl, fetchFromGitHub, buildGoPackage }:
  +
  +let
  +  version = "4.7.2";
  +  goPackagePath = "github.com/mattermost/mattermost-server";
  +  buildFlags = "-ldflags \"-X '${goPackagePath}/model.BuildNumber=nixpkgs-${version}'\"";
  +in
   
   buildGoPackage rec {
     name = "mattermost-${version}";
  -  version = "4.7.2";
   
     src = fetchFromGitHub {
       owner = "mattermost";
  
positive.code:     sha256 = "14gr7zzx77q862qccjcdwrzd6n8g2z8yngw8aa4g3q6hypsqi4v3";
    };
  
    goPackagePath = "github.com/mattermost/mattermost-server";
  
    buildPhase = ''
      runHook preBuild
      cd go/src/${goPackagePath}/cmd/platform
      go install
      runHook postBuild
    '';
  
  
negative.code:   '';
  
    meta = with stdenv.lib; {
      description = "Open-source, self-hosted Slack-alternative";
      homepage = https://www.mattermost.org;
      license = with licenses; [ agpl3 asl20 ];
      maintainers = with maintainers; [ fpletz ryantm ];
  