anchor.diff:      # pthread support.
       ./pthreadpool-disable-gcd.diff
     ];
  +
  +  # The dataclasses module is included with Python >= 3.7. This should
  +  # be fixed with the next PyTorch release.
  +  postPatch = ''
  +    substituteInPlace setup.py \
  +      --replace "'dataclasses'" "'dataclasses; python_version < \"3.7\"'"
  +  '';
   
     preConfigure = lib.optionalString cudaSupport ''
       export TORCH_CUDA_ARCH_LIST="${lib.strings.concatStringsSep ";" final_cudaArchList}"
  
positive.code:   # dependencies for torch.utils.tensorboard
    pillow, six, future, tensorflow-tensorboard, protobuf,
  
    utillinux, which, isPy3k }:
  
  assert !openMPISupport || openmpi != null;
  
  
negative.code:     click
      numpy
      pyyaml
      typing-extensions
      # the following are required for tensorboard support
      pillow six future tensorflow-tensorboard protobuf
    ] ++ lib.optionals openMPISupport [ openmpi ]
      ++ lib.optionals (pythonOlder "3.7") [ dataclasses ];
  
    checkInputs = [ hypothesis ninja psutil ];
  
  