anchor.diff:  in python3.pkgs.buildPythonApplication rec {
     pname = "pyre-check";
     version = pyre-version;
  -  src = fetchFromGitHub {
  -    owner = "facebook";
  -    repo = "pyre-check";
  -    rev = "v${pyre-version}";
  -    sha256 = "0ig7bx2kfn2kbxw74wysh5365yp5gyby42l9l29iclrzdghgk32l";
  -  };
  -  patches = [
  -    (fetchpatch {
  -      url = "https://github.com/facebook/pyre-check/commit/b473d2ed9fc11e7c1cd0c7b8c42f521e5cdc2003.patch";
  -      sha256 = "05xvyp7j4n6z92bxf64rxfq5pvaadxgx1c8c5qziy75vdz72lkcy";
  -    })
  -    ./pyre-bdist-wheel.patch
  -  ];
  +  src = pyre-src;
  +  patches = [ ./pyre-bdist-wheel.patch ];
   
     # The build-pypi-package script does some funky stuff with build
     # directories - easier to patch it a bit than to replace it
  
positive.code:     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"
      substituteInPlace client/buck.py \
          --replace '"buck"' '"${buck}/bin/buck"'
      substituteInPlace client/tests/buck_test.py \
          --replace '"buck"' '"${buck}/bin/buck"'
    '';
  
    buildInputs = [ pyre-bin rsync ];
    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
    '';
  }
  
negative.code:     export HOME=.
  
      # "external" because https://github.com/facebook/pyre-check/pull/8/files
      sed "s/%VERSION%/external/" dune.in > dune
  
      cp ${versionFile} ./scripts/generate-version-number.sh
  