anchor.diff:      "-DUSE_BACKEND=CUDA"
     ] ++ lib.optionals (enableGPU && !enableCuda) [
       "-DUSE_BACKEND=OPENCL"
  +  ] ++ lib.optionals enableContrib [
  +    "-DBUILD_DISTRIBUTED=1"
  +    "-DNO_GIT_REVISION=OFF"
  +    "-DGIT_EXECUTABLE=${fakegit}/bin/git"
     ] ++ lib.optionals enableTcmalloc [
       "-DUSE_TCMALLOC=ON"
     ] ++ lib.optionals enableBigBoards [
  
positive.code: { stdenv
  , gcc8Stdenv
  , lib
  , libzip
  , boost
  , cmake
  , makeWrapper
  , fetchFromGitHub
  , fetchpatch
  , cudnn ? null
  , cudatoolkit ? null
  , mesa ? null
  , opencl-headers ? null
  , ocl-icd ? null
  , gperftools ? null
  , eigen ? null
  , enableAVX2 ? stdenv.hostPlatform.avx2Support
  , enableBigBoards ? false
  , enableCuda ? false
  , enableGPU ? true
  , enableTcmalloc ? true
  }:
  
  assert !enableGPU -> (
    eigen != null &&
    !enableCuda);
  
  assert enableCuda -> (
    mesa != null &&
    cudatoolkit != null &&
    cudnn != null);
  
  assert !enableCuda -> (
    !enableGPU || (
      opencl-headers != null &&
      ocl-icd != null));
  
  assert enableTcmalloc -> (
    gperftools != null);
  
  let
    env = if enableCuda
  
negative.code:   ] ++ lib.optionals (enableGPU && !enableCuda) [
      opencl-headers
      ocl-icd
    ] ++ lib.optionals enableContrib [
      openssl
    ] ++ lib.optionals enableTcmalloc [
      gperftools
    ];
  