anchor.diff:        "-DGLEW_INCLUDE_DIR=${glew.dev}/include"
         "-DGLEW_LIBRARY=${glew.dev}/lib"
       ] ++ lib.optionals cudaSupport [
  -      "-DOSD_CUDA_NVCC_FLAGS=--gpu-architecture=compute_30"
  +      "-DOSD_CUDA_NVCC_FLAGS=--gpu-architecture=${cudaArch}"
         "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
  +    ] ++ lib.optionals (!openclSupport) [
  +      "-DNO_OPENCL=1"
       ];
   
     postInstall = "rm $out/lib/*.a";
  
positive.code: { config, lib, stdenv, fetchFromGitHub, cmake, pkg-config, xorg, libGLU
  , libGL, glew, ocl-icd, python3
  , cudaSupport ? config.cudaSupport or false, cudatoolkit
  , darwin
  }:
  
  
negative.code:       glew xorg.libX11 xorg.libXrandr xorg.libXxf86vm xorg.libXcursor
        xorg.libXinerama xorg.libXi
      ]
      ++ lib.optional (openclSupport && !stdenv.isDarwin) ocl-icd
      ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [OpenCL Cocoa CoreVideo IOKit AppKit AGL ])
      ++ lib.optional cudaSupport cudatoolkit;
  
  