diff --git a/pkgs/by-name/on/onetbb/package.nix b/pkgs/by-name/on/onetbb/package.nix index 34b43ec46047..d0d874f84998 100644 --- a/pkgs/by-name/on/onetbb/package.nix +++ b/pkgs/by-name/on/onetbb/package.nix @@ -1,15 +1,20 @@ -{ +args@{ lib, stdenv, fetchFromGitHub, - fetchpatch, cmake, - hwloc, + hwloc, # Purposefully shadowed below ninja, pkg-config, ctestCheckHook, }: - +let + # The behavior of OneTBB does not change if it is built with hwloc with support for CUDA. + # However, the derivation *does* change, causing rebuilds of packages like Nix. + # To avoid these pointless rebuilds, we make sure to always use a version of hwloc with CUDA + # support disabled. + hwloc = args.hwloc.override { enableCuda = false; }; +in stdenv.mkDerivation (finalAttrs: { pname = "onetbb"; version = "2022.3.0";