anchor.diff:        overlays = nixpkgsOverlays;
       };
       nixpkgs = nixpkgsFunc (nixpkgsArgs // { inherit system; });
  -    inherit (nixpkgs) fetchurl fetchgit fetchgitPrivate fetchFromGitHub;
  +    inherit (nixpkgs) lib fetchurl fetchgit fetchgitPrivate fetchFromGitHub;
       nixpkgsCross = {
  -      android = nixpkgs.lib.mapAttrs (_: args: nixpkgsFunc (nixpkgsArgs // args)) rec {
  +      android = lib.mapAttrs (_: args: nixpkgsFunc (nixpkgsArgs // args)) rec {
           aarch64 = {
             system = "x86_64-linux";
             overlays = nixpkgsArgs.overlays ++ [androidPICPatches];
  -          crossSystem = nixpkgs.lib.systems.examples.aarch64-android-prebuilt;
  +          crossSystem = lib.systems.examples.aarch64-android-prebuilt;
           };
           aarch32 = {
             system = "x86_64-linux";
             overlays = nixpkgsArgs.overlays ++ [androidPICPatches];
  -          crossSystem = nixpkgs.lib.systems.examples.armv7a-android-prebuilt;
  +          crossSystem = lib.systems.examples.armv7a-android-prebuilt;
           };
           # Back compat
           arm64Impure = builtins.trace "Warning: nixpkgsCross.android.arm64Impure has been deprecated, using nixpkgsCross.android.aarch64 instead." aarch64;
           armv7aImpure = builtins.trace "Warning: nixpkgsCross.android.armv7aImpure has been deprecated, using nixpkgsCross.android.aarch32 instead." aarch32;
         };
  -      ios = nixpkgs.lib.mapAttrs (_: args: nixpkgsFunc (nixpkgsArgs // args)) rec {
  +      ios = lib.mapAttrs (_: args: nixpkgsFunc (nixpkgsArgs // args)) rec {
           simulator64 = {
             system = "x86_64-darwin";
             overlays = nixpkgsArgs.overlays ++ [appleLibiconvHack];
  -          crossSystem = nixpkgs.lib.systems.examples.iphone64-simulator // {
  +          crossSystem = lib.systems.examples.iphone64-simulator // {
               sdkVer = iosSdkVersion;
             };
           };
           aarch64 = {
             system = "x86_64-darwin";
             overlays = nixpkgsArgs.overlays ++ [appleLibiconvHack];
  -          crossSystem = nixpkgs.lib.systems.examples.iphone64 // {
  +          crossSystem = lib.systems.examples.iphone64 // {
               sdkVer = iosSdkVersion;
             };
           };
           aarch32 = {
             system = "x86_64-darwin";
             overlays = nixpkgsArgs.overlays ++ [appleLibiconvHack];
  -          crossSystem = nixpkgs.lib.systems.examples.iphone32 // {
  +          crossSystem = lib.systems.examples.iphone32 // {
               sdkVer = iosSdkVersion;
             };
           };
  
positive.code:   };
    ghcjs = ghcjs8_4;
    ghcHEAD = (extendHaskellPackages nixpkgs.pkgs.haskell.packages.ghcHEAD).override {
      overrides = nixpkgs.lib.foldr nixpkgs.lib.composeExtensions (_: _: {}) [
        (optionalExtension enableExposeAllUnfoldings haskellOverlays.exposeAllUnfoldings)
        haskellOverlays.ghc-head
      ];
    };
    ghc8_4 = (extendHaskellPackages nixpkgs.pkgs.haskell.packages.ghc843).override {
      overrides = nixpkgs.lib.foldr nixpkgs.lib.composeExtensions (_: _: {}) [
        (optionalExtension enableExposeAllUnfoldings haskellOverlays.exposeAllUnfoldings)
        (ghcjsPkgs (useTextJSStringAsBootPkg (nixpkgs.pkgs.haskell.compiler.ghcjs84.override {
          ghcjsSrc = fetchgit {
  
negative.code:       chmod -R +w .
        patch -p1 <"$patch"
      '';
  in with lib; with haskellLib;
  let overrideCabal = pkg: f: if pkg == null then null else haskellLib.overrideCabal pkg f;
      replaceSrc = pkg: src: version: overrideCabal pkg (drv: {
        inherit src version;
  