summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-05-11 15:42:41 +0200
committerJan Tojnar <jtojnar@gmail.com>2021-05-11 18:38:24 +0200
commit99396a48a5ade1b6349ecb7cb17e8cc278804545 (patch)
tree387c460d9c2012986c51d5452b77d2456869e984 /pkgs
parent5ff66dca33bb3a5b7ca54512771b116458acc0ed (diff)
downloadnixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.tar
nixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.tar.gz
nixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.tar.bz2
nixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.tar.lz
nixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.tar.xz
nixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.tar.zst
nixpkgs-99396a48a5ade1b6349ecb7cb17e8cc278804545.zip
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
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/tbb/default.nix39
1 files changed, 24 insertions, 15 deletions
diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix
index 97ce24a8398..93750621275 100644
--- a/pkgs/development/libraries/tbb/default.nix
+++ b/pkgs/development/libraries/tbb/default.nix
@@ -1,22 +1,33 @@
-{ lib, stdenv, fetchFromGitHub, fixDarwinDylibNames, compiler ? if stdenv.cc.isClang then "clang" else null, stdver ? null }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, fixDarwinDylibNames
+}:
 
-with lib; stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "tbb";
-  version = "2020_U3";
+  version = "2020.3";
 
   src = fetchFromGitHub {
-    owner = "01org";
-    repo = "tbb";
-    rev = version;
-    sha256 = "sha256-prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU=";
+    owner = "oneapi-src";
+    repo = "oneTBB";
+    rev = "v${version}";
+    sha256 = "prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU=";
   };
 
-  nativeBuildInputs = optional stdenv.isDarwin fixDarwinDylibNames;
+  patches = lib.optionals stdenv.hostPlatform.isMusl [
+    ./glibc-struct-mallinfo.patch
+  ];
 
-  makeFlags = optional (compiler != null) "compiler=${compiler}"
-    ++ optional (stdver != null) "stdver=${stdver}";
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
 
-  patches = lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch;
+  makeFlags = lib.optionals stdenv.cc.isClang [
+    "compiler=clang"
+  ];
+
+  enableParallelBuilding = true;
 
   installPhase = ''
     runHook preInstall
@@ -29,9 +40,7 @@ with lib; stdenv.mkDerivation rec {
     runHook postInstall
   '';
 
-  enableParallelBuilding = true;
-
-  meta = {
+  meta = with lib; {
     description = "Intel Thread Building Blocks C++ Library";
     homepage = "http://threadingbuildingblocks.org/";
     license = licenses.asl20;
@@ -43,7 +52,7 @@ with lib; stdenv.mkDerivation rec {
       represents a higher-level, task-based parallelism that abstracts platform
       details and threading mechanisms for scalability and performance.
     '';
-    platforms = with platforms; linux ++ darwin;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ thoughtpolice dizfer ];
   };
 }