3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/science/math/clblas/default.nix

72 lines
1.4 KiB
Nix
Raw Normal View History

2017-09-17 16:00:28 +01:00
{ stdenv
, fetchFromGitHub
, cmake
, gfortran
, blas
, boost
, python
, ocl-icd
, opencl-headers
2018-04-15 10:13:33 +01:00
, Accelerate, CoreGraphics, CoreVideo, OpenCL
2017-09-17 16:00:28 +01:00
, gtest
}:
stdenv.mkDerivation rec {
name = "clblas-${version}";
version = "2.12";
src = fetchFromGitHub {
owner = "clMathLibraries";
repo = "clBLAS";
rev = "v${version}";
sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs";
};
patches = [ ./platform.patch ];
postPatch = ''
sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt
'';
preConfigure = ''
cd src
'';
cmakeFlags = [
"-DUSE_SYSTEM_GTEST=ON"
];
buildInputs = [
cmake
gfortran
blas
python
boost
gtest
2018-04-15 10:13:33 +01:00
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
ocl-icd
opencl-headers
] ++ stdenv.lib.optionals stdenv.isDarwin [
Accelerate
CoreGraphics
CoreVideo
];
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [
OpenCL
];
2017-09-17 16:00:28 +01:00
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = "https://github.com/clMathLibraries/clBLAS";
description = "A software library containing BLAS functions written in OpenCL";
longDescription = ''
This package contains a library of BLAS functions on top of OpenCL.
'';
license = licenses.asl20;
maintainers = with maintainers; [ artuuge ];
2018-04-15 10:13:33 +01:00
platforms = platforms.unix;
2017-09-17 16:00:28 +01:00
};
}