anchor.diff:  # limitations under the License.
   
   { sources ? import ./sources.nix
  +, targetAndroid ? false
  +, targetIos ? false
  +, targetDesktop ? false
  +, targetWeb ? false
  +, fixAutoPatchelfHook ? false
   }:
   let
     config = { android_sdk.accept_license = true; };
  
positive.code:     flutter-dev = flutterPackages.dev;
    };
  
    pkgs = import sources.nixpkgs {
      inherit config;
      overlays = [
        unstable_patched_overlay
        unstable_overlay
        flutter_overlay
      ];
    };
  
    gitignoreSource = (import sources."gitignore.nix" { inherit (pkgs) lib; }).gitignoreSource;
    src = gitignoreSource ./..;
    lib = pkgs.lib;
    stdenv = pkgs.stdenv;
    androidsdk = (pkgs.androidenv.composeAndroidPackages {
      buildToolsVersions = [ "28.0.3" ];
      platformVersions = [ "29" ];
      platformToolsVersion = "29.0.6";
      includeNDK = true;
      ndkVersion = "21.0.6113669";
      abiVersions = [ "x86-64" ];
    }).androidsdk;
  in rec
  {
    inherit pkgs src;
  
    # Runtime dependencies.
    runtimeDeps = {
    };
  
    # Minimum tools required to build Note Maps.
    buildTools = {
      inherit (pkgs) flutter-dev git go gnumake jdk;
      inherit androidsdk;
    } // lib.optionalAttrs(stdenv.isLinux) {
      inherit (pkgs) clang cmake ninja;
    } // lib.optionalAttrs(stdenv.isDarwin) {
      inherit (pkgs) clang;
    };
  
    # Additional tools required to build Note Maps in a more controlled
    # environment.
  
negative.code:   };
  
    # Additional tools useful for code work and repository maintenance.
    devTools = buildTools // {
      inherit (pkgs) niv;
    };
  
    buildInputs = builtins.attrValues ciTools;
    shellInputs = builtins.attrValues devTools;
    shellHook = lib.optionalString (targetAndroid) ''
      export ANDROID_HOME="${pkgs.androidsdk}/libexec/android-sdk"
      export JAVA_HOME="${pkgs.jdk}"
    '';
  }
  