From 59d4abf424c3e3512c2b39ed12449ee33a172d70 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 19 Jun 2022 20:31:49 -0400 Subject: [PATCH 1/2] vtk_9: unbreak on darwin using VTK_VERSIONED_INSTALL This fixed VTK that was broken on darwin in #158778 with "mv: Argument list too long". Reverts: 16a1b346 ('vtk: create versionless symlinks in /lib') Reverts: 63599248 ('vtk: move headers out of /include/vtk-*') This partially reverts: 010f6ee3 ('treewide: mark broken for darwin') --- pkgs/development/libraries/vtk/generic.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index 92ed724bbdc7..eb58e0d54fdb 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -73,6 +73,7 @@ in stdenv.mkDerivation rec { "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_INCLUDEDIR=include" "-DCMAKE_INSTALL_BINDIR=bin" + "-DVTK_VERSIONED_INSTALL=OFF" ] ++ optionals enableQt [ "-D${if lib.versionOlder version "9.0" then "VTK_Group_Qt:BOOL=ON" else "VTK_GROUP_ENABLE_Qt:STRING=YES"}" ] ++ optionals (enableQt && lib.versionOlder version "8.0") [ @@ -90,22 +91,13 @@ in stdenv.mkDerivation rec { sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c ''; - preFixup = '' - for lib in $out/lib/libvtk*.so; do - ln -s $lib $out/lib/"$(basename "$lib" | sed -e 's/-[[:digit:]]*.[[:digit:]]*//g')" - done - - mv $out/include/vtk-${majorVersion}/* $out/include - rmdir $out/include/vtk-${majorVersion} - ln -s $out/include $out/include/vtk-${majorVersion} - ''; - meta = with lib; { - broken = stdenv.isDarwin; description = "Open source libraries for 3D computer graphics, image processing and visualization"; homepage = "https://www.vtk.org/"; license = licenses.bsd3; maintainers = with maintainers; [ knedlsepp tfmoraes lheckemann ]; platforms = with platforms; unix; + # /nix/store/xxxxxxx-apple-framework-Security/Library/Frameworks/Security.framework/Headers/Authorization.h:192:7: error: variably modified 'bytes' at file scope + broken = stdenv.isDarwin && (lib.versions.major majorVersion == "7" || lib.versions.major majorVersion == "8"); }; } From 4e73c51684327c0c7e65e387d0da435d3ce4189e Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 21 Jun 2022 23:01:27 -0400 Subject: [PATCH 2/2] rtabmap: fix build --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09faa28ac730..ee76beddd346 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9697,7 +9697,9 @@ with pkgs; rocket = libsForQt5.callPackage ../tools/graphics/rocket { }; - rtabmap = libsForQt5.callPackage ../applications/video/rtabmap/default.nix { }; + rtabmap = libsForQt5.callPackage ../applications/video/rtabmap/default.nix { + pcl = pcl.override { vtk = vtkWithQt5; }; + }; rtaudio = callPackage ../development/libraries/audio/rtaudio { jack = libjack2;