From 8db5a1a6b911cf32e95cdb351a6aeab1812fc7b6 Mon Sep 17 00:00:00 2001 From: Alex James Date: Sun, 17 Dec 2023 17:21:54 -0600 Subject: [PATCH] pcl: fix configurePhase with withCuda=true NixOS/nixpkgs#271078 caused the configurePhase of pcl to fail when withCuda is set to true. Fix NixOS/nixpkgs#275090 by replacing cudatoolkit with cudaPackages.cuda_nvcc. --- pkgs/development/libraries/pcl/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pcl/default.nix b/pkgs/development/libraries/pcl/default.nix index 635422fd9b99..31198124faac 100644 --- a/pkgs/development/libraries/pcl/default.nix +++ b/pkgs/development/libraries/pcl/default.nix @@ -18,7 +18,8 @@ , Cocoa , AGL , OpenGL -, withCuda ? false, cudatoolkit +, config +, withCuda ? config.cudaSupport, cudaPackages }: stdenv.mkDerivation rec { @@ -38,7 +39,13 @@ stdenv.mkDerivation rec { sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake ''; - nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ]; + nativeBuildInputs = [ + pkg-config + cmake + wrapQtAppsHook + ] + ++ lib.optionals withCuda [ cudaPackages.cuda_nvcc ]; + buildInputs = [ eigen libusb1 @@ -46,8 +53,7 @@ stdenv.mkDerivation rec { qtbase libXt ] - ++ lib.optionals stdenv.isDarwin [ Cocoa AGL ] - ++ lib.optionals withCuda [ cudatoolkit ]; + ++ lib.optionals stdenv.isDarwin [ Cocoa AGL ]; propagatedBuildInputs = [ boost