From 349fca7a6314f591f1d0aadc9ef45ac9e43bcfa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Jan 2021 14:09:52 +0100 Subject: [PATCH 1/3] tbb: 2019_U9 -> 2021.1.1 --- pkgs/development/libraries/tbb/default.nix | 37 ++++++++++------------ 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix index 264b34125a871..a2a6ed10c5e55 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/development/libraries/tbb/default.nix @@ -1,35 +1,30 @@ -{ stdenv, fetchFromGitHub, fixDarwinDylibNames, compiler ? if stdenv.cc.isClang then "clang" else null, stdver ? null }: +{ stdenv +, fetchFromGitHub +, fixDarwinDylibNames +, cmake +}: with stdenv.lib; stdenv.mkDerivation rec { pname = "tbb"; - version = "2019_U9"; + version = "2021.1.1"; src = fetchFromGitHub { - owner = "01org"; - repo = "tbb"; - rev = version; - sha256 = "1a39nflw7b2n51jfp3fdprnkpgzaspzww1dckfvaigflfli9s8rj"; + owner = "oneapi-src"; + repo = "oneTBB"; + rev = "v${version}"; + sha256 = "sha256-uI6q+1okoJ7x88ay7XTNMhT+0uYDfu+1zf0RcGCyilc="; }; - nativeBuildInputs = optional stdenv.isDarwin fixDarwinDylibNames; + nativeBuildInputs = [ cmake ] ++ optional stdenv.isDarwin fixDarwinDylibNames; - makeFlags = optional (compiler != null) "compiler=${compiler}" - ++ optional (stdver != null) "stdver=${stdver}"; + NIX_CFLAGS_COMPILE = [ "-Wno-error" ]; - patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch; - - 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 + # tbb detects this compiler as Clang instead of AppleClang + prePatch = stdenv.lib.optional stdenv.hostPlatform.isDarwin '' + mv cmake/compilers/AppleClang.cmake cmake/compilers/Clang.cmake ''; - enableParallelBuilding = true; + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./glibc-struct-mallinfo.patch; meta = { description = "Intel Thread Building Blocks C++ Library"; From bfc0e25fa885713a9994f798735901f1baa34790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 13 Jan 2021 16:55:51 +0100 Subject: [PATCH 2/3] ispc: 1.13.0 -> 1.15.0 --- pkgs/development/compilers/ispc/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix index 01e1eaca6e1d9..ae8248ee873a2 100644 --- a/pkgs/development/compilers/ispc/default.nix +++ b/pkgs/development/compilers/ispc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub +{ stdenv, fetchFromGitHub, fetchpatch , cmake, which, m4, python3, bison, flex, llvmPackages # the default test target is sse4, but that is not supported by all Hydra agents @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "ispc"; - version = "1.13.0"; + version = "1.15.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "1l74xkpwwxc38k2ngg7mpvswziiy91yxslgfad6688hh1n5jvayd"; + sha256 = "sha256-W285n/0ehVNxcIASCMEvUUJQXJGm3sKl0jdf+ua4C+A="; }; nativeBuildInputs = [ cmake which m4 bison flex python3 ]; @@ -22,7 +22,12 @@ stdenv.mkDerivation rec { llvm llvmPackages.clang-unwrapped ]; + postPatch = '' + # clang is not installed into the LLVM prefix in NixOS + # FIXME: in the next release LLVMConfig.cmake will be called FindLLVM.cmake + sed -i -e 's!NO_DEFAULT_PATH!!' cmake/LLVMConfig.cmake + substituteInPlace CMakeLists.txt \ --replace curses ncurses substituteInPlace cmake/GenerateBuiltins.cmake \ From ee40429d0e3e2cbcc63a7c68cbad119e49f05382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 13 Jan 2021 16:08:15 +0100 Subject: [PATCH 3/3] openimagedenoise: 1.2.2 -> 1.2.4 --- .../libraries/openimagedenoise/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/openimagedenoise/default.nix b/pkgs/development/libraries/openimagedenoise/default.nix index 2ac74c6c240bd..6dc0886912e8c 100644 --- a/pkgs/development/libraries/openimagedenoise/default.nix +++ b/pkgs/development/libraries/openimagedenoise/default.nix @@ -1,18 +1,26 @@ -{ stdenv, fetchzip, cmake, tbb, python, ispc }: +{ stdenv, fetchzip, fetchpatch, cmake, tbb, python3, ispc }: stdenv.mkDerivation rec { pname = "openimagedenoise"; - version = "1.2.2"; + version = "1.2.4"; # The release tarballs include pretrained weights, which would otherwise need to be fetched with git-lfs src = fetchzip { url = "https://github.com/OpenImageDenoise/oidn/releases/download/v${version}/oidn-${version}.src.tar.gz"; - sha256 = "0wyaarjxkzlvljmpnr7qm06ma2wl1aik3z664gwpzhizswygk6yp"; + sha256 = "sha256-RfmBDOSnrNe2ca0MRGK8CbnNrk2VF1erZQmnYcsmSEE="; }; - nativeBuildInputs = [ cmake python ispc ]; + nativeBuildInputs = [ cmake python3 ispc ]; buildInputs = [ tbb ]; + patches = [ + (fetchpatch { + # https://github.com/OpenImageDenoise/oidn/pull/95 + url = "https://github.com/OpenImageDenoise/oidn/commit/31e21d243d2260c8b9a63d1955d9055b0ede8eb5.patch"; + sha256 = "sha256-KdNz1v2PiZdxMkH8x+K3EkMqFhonP/iv21Zx7wQYkA0="; + }) + ]; + meta = with stdenv.lib; { homepage = "https://openimagedenoise.github.io"; description = "High-Performance Denoising Library for Ray Tracing";