2017-10-29 05:21:30 +00:00
|
|
|
{ stdenv, fetchFromGitHub, compiler ? if stdenv.cc.isClang then "clang" else null, stdver ? null }:
|
2012-07-18 10:44:34 +00:00
|
|
|
|
2017-10-29 05:21:30 +00:00
|
|
|
with stdenv.lib; stdenv.mkDerivation rec {
|
2017-10-28 22:48:47 +00:00
|
|
|
name = "tbb-${version}";
|
2018-06-23 16:46:51 +00:00
|
|
|
version = "2018_U5";
|
2012-07-18 10:44:34 +00:00
|
|
|
|
2017-10-28 22:48:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "01org";
|
|
|
|
repo = "tbb";
|
|
|
|
rev = version;
|
2018-06-23 16:46:51 +00:00
|
|
|
sha256 = "080df8h2whnly6n9pslpg07dc9vr0p45gqgy9qijpjvxkjwfkdkp";
|
2012-07-18 10:44:34 +00:00
|
|
|
};
|
|
|
|
|
2017-10-29 05:21:30 +00:00
|
|
|
makeFlags = concatStringsSep " " (
|
|
|
|
optional (compiler != null) "compiler=${compiler}" ++
|
|
|
|
optional (stdver != null) "stdver=${stdver}"
|
|
|
|
);
|
|
|
|
|
2017-10-23 02:02:39 +00:00
|
|
|
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch;
|
|
|
|
|
2012-07-18 10:44:34 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{lib,share/doc}
|
2017-09-12 19:36:41 +00:00
|
|
|
cp "build/"*release*"/"*${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib/
|
2012-07-18 10:44:34 +00:00
|
|
|
mv include $out/
|
|
|
|
rm $out/include/index.html
|
|
|
|
mv doc/html $out/share/doc/tbb
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-10-29 05:21:30 +00:00
|
|
|
meta = {
|
2012-07-18 10:44:34 +00:00
|
|
|
description = "Intel Thread Building Blocks C++ Library";
|
2017-10-28 22:48:47 +00:00
|
|
|
homepage = "http://threadingbuildingblocks.org/";
|
|
|
|
license = licenses.asl20;
|
2012-07-18 10:44:34 +00:00
|
|
|
longDescription = ''
|
|
|
|
Intel Threading Building Blocks offers a rich and complete approach to
|
|
|
|
expressing parallelism in a C++ program. It is a library that helps you
|
|
|
|
take advantage of multi-core processor performance without having to be a
|
|
|
|
threading expert. Intel TBB is not just a threads-replacement library. It
|
|
|
|
represents a higher-level, task-based parallelism that abstracts platform
|
|
|
|
details and threading mechanisms for scalability and performance.
|
|
|
|
'';
|
2017-10-28 22:48:47 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
maintainers = with maintainers; [ peti thoughtpolice dizfer ];
|
2012-07-18 10:44:34 +00:00
|
|
|
};
|
|
|
|
}
|