Merge pull request #232852 from figsoda/arrayfire

arrayfire: fix build on darwin
This commit is contained in:
Weijia Wang 2023-05-19 23:44:28 +03:00 committed by GitHub
commit f9e5a3c3fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 15 deletions

View File

@ -1,9 +1,27 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, opencl-clhpp, ocl-icd, fftw, fftwFloat
, blas, lapack, boost, mesa, libGLU, libGL
, freeimage, python3, clfft, clblas
, doxygen, buildDocs ? false
, cudaSupport ? false, cudatoolkit
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, 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 {
@ -48,14 +66,26 @@ stdenv.mkDerivation rec {
strictDeps = true;
buildInputs = [
opencl-clhpp fftw fftwFloat
blas lapack
libGLU libGL
mesa freeimage
boost.out boost.dev
] ++ (lib.optional stdenv.isLinux ocl-icd)
++ (lib.optional cudaSupport cudatoolkit)
++ (lib.optional buildDocs doxygen);
opencl-clhpp
fftw
fftwFloat
blas
lapack
libGLU
libGL
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; {
description = "A general-purpose library for parallel and massively-parallel computations";

View File

@ -19581,7 +19581,7 @@ with pkgs;
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 { };