nixpkgs/pkgs/development/libraries/tbb/default.nix
Jan Tojnar 99396a48a5
tbb: clean up
- Drop compiler and stdver arguments – if someone needs to provide them, they can just use overrideAttrs
- Update repo source
- Narrow scope of `with lib` declaration
- Change optional → optionals
- Use one input per line
- Build on all unix platforms
- Re-order attributes
2021-05-11 18:38:24 +02:00

59 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fixDarwinDylibNames
}:
stdenv.mkDerivation rec {
pname = "tbb";
version = "2020.3";
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "oneTBB";
rev = "v${version}";
sha256 = "prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU=";
};
patches = lib.optionals stdenv.hostPlatform.isMusl [
./glibc-struct-mallinfo.patch
];
nativeBuildInputs = lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];
makeFlags = lib.optionals stdenv.cc.isClang [
"compiler=clang"
];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp "build/"*release*"/"*${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib/
mv include $out/
rm $out/include/index.html
runHook postInstall
'';
meta = with lib; {
description = "Intel Thread Building Blocks C++ Library";
homepage = "http://threadingbuildingblocks.org/";
license = licenses.asl20;
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.
'';
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice dizfer ];
};
}