anchor.diff:    PYTORCH_BUILD_VERSION = version;
     PYTORCH_BUILD_NUMBER = 0;
   
  -  USE_SYSTEM_NCCL=useSystemNccl;                  # don't build pytorch's third_party NCCL
  +  USE_SYSTEM_NCCL=setBool useSystemNccl;                  # don't build pytorch's third_party NCCL
   
     # Suppress a weird warning in mkl-dnn, part of ideep in pytorch
     # (upstream seems to have fixed this in the wrong place?)
  
positive.code:   # Use pytorch's custom configurations
    dontUseCmakeConfigure = true;
  
    BUILD_NAMEDTENSOR = true;
    BUILD_DOCS = buildDocs;
  
    USE_MKL = blas.implementation == "mkl";
  
    # Unlike MKL, oneDNN (née MKLDNN) is FOSS, so we enable support for
    # it by default. PyTorch currently uses its own vendored version
    # of oneDNN through Intel iDeep.
    USE_MKLDNN = mklDnnSupport;
    USE_MKLDNN_CBLAS = mklDnnSupport;
  
    preBuild = ''
      export MAX_JOBS=$NIX_BUILD_CORES
  
negative.code: assert !cudaSupport || magma.cudatoolkit == cudatoolkit;
  
  let
    setBool = v: if v then "1" else "0";
    cudatoolkit_joined = symlinkJoin {
      name = "${cudatoolkit.name}-unsplit";
      # nccl is here purely for semantic grouping it could be moved to nativeBuildInputs
  