anchor.diff:      runHook postInstall
     '';
   
  +  doInstallCheck = true;
  +  installCheckPhase = ''
  +    $out/bin/argocd version --client | grep ${tag} > /dev/null
  +  '';
  +
     postInstall = ''
  -    for appname in argocd-util argocd-server argocd-repo-server argocd-application-controller argocd-dex ; do
  -      makeWrapper $out/bin/argocd $out/bin/$appname --set ARGOCD_BINARY_NAME $appname
  -    done
       installShellCompletion --cmd argocd \
         --bash <($out/bin/argocd completion bash) \
         --zsh <($out/bin/argocd completion zsh)
  
positive.code: { lib, buildGoModule, fetchFromGitHub, packr, makeWrapper, installShellFiles, helm, kustomize }:
  
  buildGoModule rec {
    pname = "argocd";
    version = "2.2.5";
    commit = "8f981ccfcf942a9eb00bc466649f8499ba0455f5";
    tag = "v${version}";
  
    src = fetchFromGitHub {
      owner = "argoproj";
      repo = "argo-cd";
      rev = tag;
      sha256 = "sha256-wSvDoRHV4BObRL8lEpHt9oGXNB06LXdIYasRYqmM5QA=";
    };
  
    vendorSha256 = "sha256-BVhts+gOM6nhcR1lkFzy7OJnainLXw5YdeseBBRF2xE=";
  
    nativeBuildInputs = [ packr makeWrapper installShellFiles ];
  
    # run packr to embed assets
    preBuild = ''
      packr
    '';
  
    ldflags =
      let package_url = "github.com/argoproj/argo-cd/v2/common"; in
  
negative.code:       "-X ${package_url}.gitTreeState=clean"
      ];
  
    nativeBuildInputs = [ installShellFiles ];
  
    installPhase = ''
      runHook preInstall
  