diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-31 10:47:18 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-04-17 16:24:09 -0500 |
commit | 1c8aba83340be3713f68410d1d273a8b15e7e007 (patch) | |
tree | fdc752744f384be57b6ff3c65495018432bff0ab /pkgs/development/libraries/arrayfire | |
parent | 43873351ffed36b52170571839e26b57c9f15920 (diff) |
treewide: use blas and lapack
This makes packages use lapack and blas, which can wrap different BLAS/LAPACK implementations. treewide: cleanup from blas/lapack changes A few issues in the original treewide: - can’t assume blas64 is a bool - unused commented code
Diffstat (limited to 'pkgs/development/libraries/arrayfire')
-rw-r--r-- | pkgs/development/libraries/arrayfire/default.nix | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix index 21e93a8cd4922..e637aab48b227 100644 --- a/pkgs/development/libraries/arrayfire/default.nix +++ b/pkgs/development/libraries/arrayfire/default.nix @@ -1,14 +1,12 @@ { stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig -, cudatoolkit, opencl-clhpp, ocl-icd, fftw, fftwFloat, mkl -, blas, openblas, boost, mesa, libGLU, libGL +, opencl-clhpp, ocl-icd, fftw, fftwFloat, mkl +, blas, lapack, boost, mesa, libGLU, libGL , freeimage, python, clfft, clblas , doxygen, buildDocs ? false +, cudaSupport ? false, cudatoolkit }: -let - strOnLinux = stdenv.lib.optionalString stdenv.isLinux; - -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "arrayfire"; version = "3.6.4"; @@ -21,8 +19,7 @@ in stdenv.mkDerivation rec { "-DAF_BUILD_OPENCL=OFF" "-DAF_BUILD_EXAMPLES=OFF" "-DBUILD_TESTING=OFF" - (strOnLinux "-DCMAKE_LIBRARY_PATH=${cudatoolkit}/lib/stubs") - ]; + ] ++ stdenv.lib.optional cudaSupport "-DCMAKE_LIBRARY_PATH=${cudatoolkit}/lib/stubs"; patches = [ ./no-download.patch ]; @@ -35,7 +32,7 @@ in stdenv.mkDerivation rec { cp -R --no-preserve=mode,ownership ${opencl-clhpp}/include/CL/cl2.hpp ./build/include/CL/cl2.hpp ''; - preBuild = strOnLinux '' + preBuild = stdenv.lib.optionalString cudaSupport '' export CUDA_PATH="${cudatoolkit}" ''; @@ -50,12 +47,13 @@ in stdenv.mkDerivation rec { buildInputs = [ opencl-clhpp fftw fftwFloat mkl - openblas + blas lapack libGLU libGL mesa freeimage boost.out boost.dev - ] ++ (stdenv.lib.optional stdenv.isLinux [ cudatoolkit ocl-icd ]) - ++ (stdenv.lib.optional buildDocs [ doxygen ]); + ] ++ (stdenv.lib.optional stdenv.isLinux ocl-icd) + ++ (stdenv.lib.optional cudaSupport cudatoolkit) + ++ (stdenv.lib.optional buildDocs doxygen); meta = with stdenv.lib; { description = "A general-purpose library for parallel and massively-parallel computations"; |