anchor.diff:   pyre-bin = stdenv.mkDerivation {
     name = "pyre-${pyre-version}";
   
  -  src = fetchFromGitHub {
  -    owner = "facebook";
  -    repo = "pyre-check";
  -    rev = "v${pyre-version}";
  -    sha256 = "0c8xzaa3ljqb6llr041sydw0l4xqn7x21nw9vaymdxh35nx9bp2v";
  -  };
  +  src = pyre-src;
   
     nativeBuildInputs = [ makeWrapper ];
   
  
positive.code: };
  typeshed = stdenv.mkDerivation {
    name = "typeshed";
    # typeshed doesn't have versions, it seems to be synchronized with
    # mypy relases. I'm assigning a random version here (same as pyre).
    version = pyre-version;
    src = fetchFromGitHub {
      owner = "python";
      repo = "typeshed";
      rev = "a08c6ea";
      sha256 = "0wy8yh43vhyyc4g7iqnmlj66kz5in02y5qc0c4jdckhpa3mchaqk";
    };
    phases = [ "unpackPhase" "installPhase" ];
    installPhase = "cp -r $src $out";
  
negative.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 ];
    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 = ''
      bash scripts/run-python-tests.sh
    '';
  }
  