anchor.diff:        if system == null then {} else { inherit system; }
       ));
       nixpkgsCross = {
  -      ios = {
  +      ios = 
  +        let config = {
  +              allowUnfree = true;
  +              packageOverrides = p: {
  +            	darwin = p.darwin // {
  +            	  ios-cross = p.darwin.ios-cross.override {
  +            	    # Depending on where ghcHEAD is in your nixpkgs checkout, you may need llvm 39 here instead
  +            	    inherit (p.llvmPackages_39) llvm clang;
  +            	  };
  +            	};
  +            	osx_sdk = p.callPackage ({ stdenv }:
  +            	  let version = "10";
  +            	  in stdenv.mkDerivation rec {
  +            	  name = "iOS.sdk";
  +
  +            	  src = stdenv.ccCross.sdk;
  +
  +            	  unpackPhase    = "true";
  +            	  configurePhase = "true";
  +            	  buildPhase     = "true";
  +            	  setupHook = ./setup-hook-ios.sh;
  +
  +            	  installPhase = ''
  +            	    mkdir -p $out/
  +            	    echo "Source is: $src"
  +            	    cp -r $src/* $out/
  +            	  '';
  +
  +            	  meta = with stdenv.lib; {
  +            	    description = "The IOS OS ${version} SDK";
  +            	    maintainers = with maintainers; [ copumpkin ];
  +            	    platforms   = platforms.darwin;
  +            	    license     = licenses.unfree;
  +            	  };
  +            	}) {};
  +              };
  +            };
  +        in {
           simulator64 = nixpkgsFunc {
             crossSystem = 
               let cfg = {
  
positive.code:             useiOSCross = true;
              libc = "libSystem";
            };
  
            config.allowUnfree = true;
            config.packageOverrides = p: {
              darwin = p.darwin // {
                ios-cross = p.darwin.ios-cross.override {
                  # Depending on where ghcHEAD is in your nixpkgs checkout, you may need llvm 39 here instead
                  inherit (p.llvmPackages_39) llvm clang;
                };
              };
              osx_sdk = p.callPackage ({ stdenv }:
                let version = "10";
                in stdenv.mkDerivation rec {
                name = "iOS.sdk";
  
                src = stdenv.ccCross.sdk;
  
                unpackPhase    = "true";
                configurePhase = "true";
                buildPhase     = "true";
                setupHook = ./setup-hook-ios.sh;
  
                installPhase = ''
                  mkdir -p $out/
                  echo "Source is: $src"
                  cp -r $src/* $out/
                '';
  
                meta = with stdenv.lib; {
                  description = "The IOS OS ${version} SDK";
                  maintainers = with maintainers; [ copumpkin ];
                  platforms   = platforms.darwin;
                  license     = licenses.unfree;
                };
              }) {};
            };
          };
        };
      };
  
negative.code: 
      } // (if useTextJSString then overridesForTextJSString self super else {});
    };
    inherit nixpkgs overrideCabal extendHaskellPackages ghc ghc7 ghc7_8 ghcIosSimulator64 ghcIosArm64;
    stage2Script = nixpkgs.runCommand "stage2.nix" {
      GEN_STAGE2 = builtins.readFile (nixpkgs.path + "/pkgs/development/compilers/ghcjs/gen-stage2.rb");
      buildCommand = ''
  