hwloc: allow for optional build with CUDA

This commit is contained in:
Markus Kowalewski 2022-12-18 20:11:10 +01:00
parent 7ce807ee2c
commit 317cb9dba3
No known key found for this signature in database
GPG key ID: D865C8A91D7025EB

View file

@ -1,5 +1,9 @@
{ lib, stdenv, fetchurl, pkg-config, expat, ncurses, pciutils, numactl
, x11Support ? false, libX11, cairo
, x11Support ? false
, libX11
, cairo
, enableCuda ? false
, cudaPackages
}:
stdenv.mkDerivation rec {
@ -21,7 +25,8 @@ stdenv.mkDerivation rec {
buildInputs = [ expat ncurses ]
++ lib.optionals x11Support [ cairo libX11 ]
++ lib.optionals stdenv.isLinux [ numactl ];
++ lib.optionals stdenv.isLinux [ numactl ]
++ lib.optional enableCuda cudaPackages.cudatoolkit;
# Since `libpci' appears in `hwloc.pc', it must be propagated.
propagatedBuildInputs = lib.optional stdenv.isLinux pciutils;