1 { lib, stdenv, fetchFromGitHub, cmake, fftw, fftwFloat, boost, opencl-clhpp, ocl-icd, darwin }:
4 inherit (darwin.apple_sdk.frameworks) OpenCL;
6 stdenv.mkDerivation rec {
10 src = fetchFromGitHub {
11 owner = "clMathLibraries";
14 hash = "sha256-yp7u6qhpPYQpBw3d+VLg0GgMyZONVII8BsBCEoRZm4w=";
17 sourceRoot = "${src.name}/src";
20 sed -i '/-m64/d;/-m32/d' CMakeLists.txt
23 nativeBuildInputs = [ cmake ];
25 buildInputs = [ fftw fftwFloat boost ]
26 ++ lib.optionals stdenv.isLinux [ opencl-clhpp ocl-icd ]
27 ++ lib.optionals stdenv.isDarwin [ OpenCL ];
29 # https://github.com/clMathLibraries/clFFT/issues/237
30 CXXFLAGS = "-std=c++98";
33 description = "Library containing FFT functions written in OpenCL";
35 clFFT is a software library containing FFT functions written in OpenCL.
36 In addition to GPU devices, the library also supports running on CPU devices to facilitate debugging and heterogeneous programming.
38 license = licenses.asl20;
39 homepage = "http://clmathlibraries.github.io/clFFT/";
40 platforms = platforms.unix;
41 maintainers = with maintainers; [ chessai ];