nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

clfft: add darwin support

+18 -8
+17 -5
pkgs/development/libraries/clfft/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, fftw, fftwFloat, boost166, opencl-clhpp, ocl-icd }: 1 + { lib, stdenv, fetchFromGitHub, cmake, fftw, fftwFloat, boost, opencl-clhpp, ocl-icd, darwin }: 2 2 3 + let 4 + inherit (darwin.apple_sdk.frameworks) OpenCL; 5 + in 3 6 stdenv.mkDerivation rec { 4 7 pname = "clfft"; 5 8 version = "2.12.2"; ··· 10 7 src = fetchFromGitHub { 11 8 owner = "clMathLibraries"; 12 9 repo = "clFFT"; 13 - rev = "refs/tags/v${version}"; 14 - sha256 = "134vb6214hn00qy84m4djg4hqs6hw19gkp8d0wlq8gb9m3mfx7na"; 10 + rev = "v${version}"; 11 + hash = "sha256-yp7u6qhpPYQpBw3d+VLg0GgMyZONVII8BsBCEoRZm4w="; 15 12 }; 16 13 17 14 sourceRoot = "source/src"; 18 15 16 + postPatch = '' 17 + sed -i '/-m64/d;/-m32/d' CMakeLists.txt 18 + ''; 19 + 19 20 nativeBuildInputs = [ cmake ]; 20 21 21 - buildInputs = [ fftw fftwFloat boost166 opencl-clhpp ocl-icd ]; 22 + buildInputs = [ fftw fftwFloat boost ] 23 + ++ lib.optionals stdenv.isLinux [ opencl-clhpp ocl-icd ] 24 + ++ lib.optionals stdenv.isDarwin [ OpenCL ]; 25 + 26 + # https://github.com/clMathLibraries/clFFT/issues/237 27 + CXXFLAGS = "-std=c++98"; 22 28 23 29 meta = with lib; { 24 30 description = "Library containing FFT functions written in OpenCL"; ··· 37 25 ''; 38 26 license = licenses.asl20; 39 27 homepage = "http://clmathlibraries.github.io/clFFT/"; 40 - platforms = [ "i686-linux" "x86_64-linux" ]; 28 + platforms = platforms.unix; 41 29 maintainers = with maintainers; [ chessai ]; 42 30 }; 43 31 }
+1 -3
pkgs/top-level/all-packages.nix
··· 18857 18857 18858 18858 classads = callPackage ../development/libraries/classads { }; 18859 18859 18860 - clfft = callPackage ../development/libraries/clfft { 18861 - stdenv = gcc10StdenvCompat; 18862 - }; 18860 + clfft = callPackage ../development/libraries/clfft { }; 18863 18861 18864 18862 clipp = callPackage ../development/libraries/clipp { }; 18865 18863