arrayfire: fix build on darwin

This commit is contained in:
figsoda 2023-05-19 11:29:52 -04:00
parent 8a4c408a8e
commit f7c59ea08c
2 changed files with 45 additions and 15 deletions

View File

@ -1,9 +1,27 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config { lib
, opencl-clhpp, ocl-icd, fftw, fftwFloat , stdenv
, blas, lapack, boost, mesa, libGLU, libGL , fetchFromGitHub
, freeimage, python3, clfft, clblas , cmake
, doxygen, buildDocs ? false , pkg-config
, cudaSupport ? false, cudatoolkit , opencl-clhpp
, ocl-icd
, fftw
, fftwFloat
, blas
, lapack
, boost
, mesa
, libGLU
, libGL
, freeimage
, python3
, clfft
, clblas
, doxygen
, buildDocs ? false
, cudaSupport ? false
, cudatoolkit
, darwin
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -48,14 +66,26 @@ stdenv.mkDerivation rec {
strictDeps = true; strictDeps = true;
buildInputs = [ buildInputs = [
opencl-clhpp fftw fftwFloat opencl-clhpp
blas lapack fftw
libGLU libGL fftwFloat
mesa freeimage blas
boost.out boost.dev lapack
] ++ (lib.optional stdenv.isLinux ocl-icd) libGLU
++ (lib.optional cudaSupport cudatoolkit) libGL
++ (lib.optional buildDocs doxygen); mesa
freeimage
boost.out
boost.dev
] ++ lib.optionals stdenv.isLinux [
ocl-icd
] ++ lib.optionals cudaSupport [
cudatoolkit
] ++ lib.optionals buildDocs [
doxygen
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.Accelerate
];
meta = with lib; { meta = with lib; {
description = "A general-purpose library for parallel and massively-parallel computations"; description = "A general-purpose library for parallel and massively-parallel computations";

View File

@ -19577,7 +19577,7 @@ with pkgs;
armadillo = callPackage ../development/libraries/armadillo { }; armadillo = callPackage ../development/libraries/armadillo { };
arrayfire = callPackage ../development/libraries/arrayfire { }; arrayfire = darwin.apple_sdk_11_0.callPackage ../development/libraries/arrayfire { };
arrow-cpp = callPackage ../development/libraries/arrow-cpp { }; arrow-cpp = callPackage ../development/libraries/arrow-cpp { };