anchor.diff:    # https://github.com/yesodweb/serversession/issues/1
     serversession = dontCheck super.serversession;
   
  -  yesod-bin = if pkgs.stdenv.isDarwin
  -    then addBuildDepend super.yesod-bin pkgs.darwin.apple_sdk.frameworks.Cocoa
  -    else super.yesod-bin;
  -
  -  hmatrix = if pkgs.stdenv.isDarwin
  -    then addBuildDepend super.hmatrix pkgs.darwin.apple_sdk.frameworks.Accelerate
  -    else super.hmatrix;
  +  yesod-bin = super.yesod-bin;
  +
  +  hmatrix = super.hmatrix;
   
     # https://github.com/commercialhaskell/stack/issues/408
     # https://github.com/commercialhaskell/stack/issues/409
  
positive.code:   # https://github.com/haskell/vector/issues/47
    vector = super.vector;
  
    halive = if pkgs.stdenv.isDarwin
      then addBuildDepend super.halive pkgs.darwin.apple_sdk.frameworks.AppKit
      else super.halive;
  
    # cabal2nix likes to generate dependencies on hinotify when hfsevents is really required
    # on darwin: https://github.com/NixOS/cabal2nix/issues/146.
    hinotify = if pkgs.stdenv.isDarwin then self.hfsevents else super.hinotify;
  
    # hfsevents needs CoreServices in scope
    hfsevents = if pkgs.stdenv.isDarwin
      then with pkgs.darwin.apple_sdk.frameworks; addBuildTool (addBuildDepends super.hfsevents [Cocoa]) CoreServices
      else super.hfsevents;
  
    # FSEvents API is very buggy and tests are unreliable. See
    # http://openradar.appspot.com/10207999 and similar issues.
    # https://github.com/haskell-fswatch/hfsnotify/issues/62
    fsnotify = dontCheck super.fsnotify; # if pkgs.stdenv.isDarwin then dontCheck super.fsnotify else super.fsnotify;
  
    # the system-fileio tests use canonicalizePath, which fails in the sandbox
    system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio;
  
    # Prevents needing to add security_tool as a build tool to all of x509-system's
    # dependencies.
    x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc
      then let inherit (pkgs.darwin) security_tool;
        in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
          postPatch = (drv.postPatch or "") + ''
            substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security
          '';
        })
      else super.x509-system;
  
    double-conversion = if !pkgs.stdenv.isDarwin
      then super.double-conversion
      else addBuildDepend (overrideCabal super.double-conversion (drv:
        {
          postPatch = ''
            substituteInPlace double-conversion.cabal --replace stdc++ c++
          '';
        })) pkgs.llvmPackages.libcxx;
  
    # tests don't compile for some odd reason
    jwt = dontCheck super.jwt;
  
negative.code: 
    # https://github.com/ndmitchell/shake/issues/206
    # https://github.com/ndmitchell/shake/issues/267
    shake = overrideCabal super.shake (drv: { });
  
    # https://github.com/nushio3/doctest-prop/issues/1
    doctest-prop = dontCheck super.doctest-prop;
  