anchor.diff:      mkdir ./build
       substituteInPlace scripts/build-pypi-package.sh \
           --replace 'NIX_BINARY_FILE' '${pyre-bin}/bin/pyre.bin' \
  -        --replace 'BUILD_ROOT="$(mktemp -d)"' "BUILD_ROOT=$(pwd)/build"
  +        --replace 'BUILD_ROOT="$(mktemp -d)"' "BUILD_ROOT=$PWD/build"
       substituteInPlace client/buck.py \
           --replace '"buck"' '"${buck}/bin/buck"'
       substituteInPlace client/tests/buck_test.py \
           --replace '"buck"' '"${buck}/bin/buck"'
     '';
   
  -  buildInputs = [ pyre-bin rsync ];
  +  buildInputs = [ pyre-bin ];
  +  nativeBuildInputs = [ rsync ]; # only required for build-pypi-package.sh
     propagatedBuildInputs = with python3.pkgs; [ docutils typeshed ];
     buildPhase = ''
       bash scripts/build-pypi-package.sh --version ${pyre-version} --bundle-typeshed ${typeshed}
       cp -r build/dist dist
     '';
     checkPhase = ''
  -    sed -i 's/which python3/command -v python3/g' scripts/run-python-tests.sh
       bash scripts/run-python-tests.sh
     '';
   }
  
positive.code:     export HOME=.
  
      # "external" because https://github.com/facebook/pyre-check/pull/8/files
      cp Makefile.template Makefile
      sed "s/%VERSION%/external/" dune.in > dune
  
      cp ${versionFile} ./scripts/generate-version-number.sh
  
negative.code: let
    # Manually set version - the setup script requires
    # hg and git + keeping the .git directory around.
    pyre-version = "0.0.17";  # also change typeshed revision below with $pyre-src/.typeshed-version
    pyre-src = fetchFromGitHub {
      owner = "facebook";
      repo = "pyre-check";
      rev = "v${pyre-version}";
      sha256 = "0y86a3g5xbgh0byksyx5jw7yq7w840x85dhz9inz6mkg5j06mcis";
    };
    versionFile = writeScript "version.ml" ''
      cat > "./version.ml" <<EOF
      open Core
  