2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fixDarwinDylibNames, compiler ? if stdenv.cc.isClang then "clang" else null, stdver ? null }:
|
2012-07-18 11:44:34 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
with lib; stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tbb";
|
2019-10-24 17:41:36 +01:00
|
|
|
version = "2019_U9";
|
2012-07-18 11:44:34 +01:00
|
|
|
|
2017-10-28 23:48:47 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "01org";
|
|
|
|
repo = "tbb";
|
|
|
|
rev = version;
|
2019-10-24 17:41:36 +01:00
|
|
|
sha256 = "1a39nflw7b2n51jfp3fdprnkpgzaspzww1dckfvaigflfli9s8rj";
|
2012-07-18 11:44:34 +01:00
|
|
|
};
|
|
|
|
|
2020-09-05 08:11:16 +01:00
|
|
|
nativeBuildInputs = optional stdenv.isDarwin fixDarwinDylibNames;
|
|
|
|
|
2019-10-28 09:17:49 +00:00
|
|
|
makeFlags = optional (compiler != null) "compiler=${compiler}"
|
|
|
|
++ optional (stdver != null) "stdver=${stdver}";
|
2017-10-29 05:21:30 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
patches = lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch;
|
2017-10-23 03:02:39 +01:00
|
|
|
|
2012-07-18 11:44:34 +01:00
|
|
|
installPhase = ''
|
2020-12-30 14:46:58 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-04-02 09:41:10 +01:00
|
|
|
mkdir -p $out/lib
|
2017-09-12 20:36:41 +01:00
|
|
|
cp "build/"*release*"/"*${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib/
|
2012-07-18 11:44:34 +01:00
|
|
|
mv include $out/
|
|
|
|
rm $out/include/index.html
|
2020-12-30 14:46:58 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2012-07-18 11:44:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-10-29 05:21:30 +00:00
|
|
|
meta = {
|
2012-07-18 11:44:34 +01:00
|
|
|
description = "Intel Thread Building Blocks C++ Library";
|
2017-10-28 23:48:47 +01:00
|
|
|
homepage = "http://threadingbuildingblocks.org/";
|
|
|
|
license = licenses.asl20;
|
2012-07-18 11:44:34 +01: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 23:48:47 +01:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2019-03-05 11:35:59 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice dizfer ];
|
2012-07-18 11:44:34 +01:00
|
|
|
};
|
|
|
|
}
|