pcl: split dev output

Assisted-by: Claude Code (Claude Opus 5.5)
This commit is contained in:
Mike Purvis
2026-09-29 22:08:57 -04:00
parent c59305bab2
commit fbc0670fbf
2 changed files with 18 additions and 1 deletions

View File

@@ -43,6 +43,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-+KyaajJM0I5CAcr8AiOLC4TkGV3Gm73a0/X8LQWFZMI=";
};
outputs = [
"out"
"dev"
];
patches = [
(fetchpatch {
# see https://github.com/NixOS/nixpkgs/issues/485826 to be removed at next release after 1.15.1
@@ -86,6 +91,18 @@ stdenv.mkDerivation (finalAttrs: {
vtk
];
postInstall = ''
moveToOutput "share/pcl-*" "$dev"
'';
# PCLConfig.cmake is in dev and needs an absolute path back to the libraries
postFixup = ''
substituteInPlace "$dev"/share/pcl-*/PCLConfig.cmake \
--replace-fail \
'set(PCL_LIBRARY_DIRS "''${PCL_ROOT}/lib")' \
"set(PCL_LIBRARY_DIRS \"$out/lib\")"
'';
cmakeFlags = [
(lib.cmakeBool "BUILD_CUDA" cudaSupport)
(lib.cmakeBool "BUILD_GPU" cudaSupport)

View File

@@ -100,7 +100,7 @@ stdenv.mkDerivation (finalAttrs: {
env.NIX_CFLAGS_COMPILE = "-Wno-c++20-extensions";
cmakeFlags = [
(lib.cmakeFeature "CMAKE_INCLUDE_PATH" "${pcl'}/include/pcl-${lib.versions.majorMinor pcl'.version}")
(lib.cmakeFeature "CMAKE_INCLUDE_PATH" "${lib.getDev pcl'}/include/pcl-${lib.versions.majorMinor pcl'.version}")
];
passthru = {