Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions pkgs/development/compilers/ispc/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 ];
Expand All @@ -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 \
Expand Down
16 changes: 12 additions & 4 deletions pkgs/development/libraries/openimagedenoise/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
37 changes: 16 additions & 21 deletions pkgs/development/libraries/tbb/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{ stdenv, fetchFromGitHub, fixDarwinDylibNames, compiler ? if stdenv.cc.isClang then "clang" else null, stdver ? null }:
Copy link
Member Author

@Mic92 Mic92 Jan 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think specifying a compiler is needed anymore.
Otherwise using overrideAttrs to set cmakeFlags should be easy enough. same for setting the c++ standard.

{ 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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if fixDarwinDylibNames is still required.


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";
Expand Down