anchor.diff:      EOF
       chmod a+x $out/bin/stan
     '';
  +
  +  # Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference.
  +  preFixup = "rm -rf $(pwd)";
   
     meta = {
       description = "Command-line interface to Stan";
  
positive.code: 
    doCheck = true;
    checkInputs = [ python3 ];
    checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368
  
    installPhase = ''
      mkdir -p $out/opt $out/bin
  
negative.code: 
  stdenv.mkDerivation rec {
    pname = "cmdstan";
    version = "2.29.2";
  
    # includes stanc binaries needed to build cmdstand
    src = fetchurl {
      url = "https://github.com/stan-dev/cmdstan/releases/download/v${version}/cmdstan-${version}.tar.gz";
      sha256 = "sha256-VntTH6c//fcGyqF+szROHftB6GmTyvi6QIdf+RAzUVM=";
    };
  
    buildFlags = [ "build" ];
  