From fc160ebde03e445a55812ec1eba4013f855d2a3b Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Fri, 26 Jul 2024 18:46:39 -0700 Subject: [PATCH] openscad-unstable: 2024-03-10 -> 2024-07-24 Update to latest head of openscad. Fixing the cmake issue mentioned in the cccl dependency. Switch to exactly version v2.2.0 of nvidia-cccl as newer versions exhibit a header incompatibility (looks like some ambiguous swap() call differently defined in standard headers and cuda headers). --- pkgs/by-name/op/openscad-unstable/package.nix | 15 ++++++++------- .../op/openscad-unstable/thrust-cmake.patch | 13 +++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 pkgs/by-name/op/openscad-unstable/thrust-cmake.patch diff --git a/pkgs/by-name/op/openscad-unstable/package.nix b/pkgs/by-name/op/openscad-unstable/package.nix index 09514490ebf9..b0881fe10e05 100644 --- a/pkgs/by-name/op/openscad-unstable/package.nix +++ b/pkgs/by-name/op/openscad-unstable/package.nix @@ -41,15 +41,16 @@ let # get cccl from source to avoid license issues nvidia-cccl = clangStdenv.mkDerivation { pname = "nvidia-cccl"; - # note that v2.2.0 has some cmake issues - version = "2.2.0-unstable-2024-01-26"; + # note, after v2.2.0, manifold dependency fails with some swap() ambiguities + version = "2.2.0"; src = fetchFromGitHub { owner = "NVIDIA"; repo = "cccl"; fetchSubmodules = true; - rev = "0c9d03276206a5f59368e908e3d643610f9fddcd"; - hash = "sha256-f11CNfa8jF9VbzvOoX1vT8zGIJL9cZ/VBpiklUn0YdU="; + rev = "v2.2.0"; + hash = "sha256-azHDAuK0rAHrH+XkN3gHDrbwZOclP3zbEMe8VRpMjDQ="; }; + patches = [ ./thrust-cmake.patch ]; nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ tbb_2021_11 ]; cmakeFlags = [ @@ -81,12 +82,12 @@ in # clang consume much less RAM than GCC clangStdenv.mkDerivation rec { pname = "openscad-unstable"; - version = "2024-03-10"; + version = "2024-07-24"; src = fetchFromGitHub { owner = "openscad"; repo = "openscad"; - rev = "db167b1df31fbd8a2101cf3a13dac148b0c2165d"; - hash = "sha256-i2ZGYsNfMLDi3wRd/lohs9BuO2KuQ/7kJIXGtV65OQU="; + rev = "48f4430b12c29a95ab89ffdd8307205d7189421c"; + hash = "sha256-A75JHmWVNlgURb5one5JFkztCrVff2RbyaDaObUp4ZY="; fetchSubmodules = true; }; patches = [ ./test.diff ]; diff --git a/pkgs/by-name/op/openscad-unstable/thrust-cmake.patch b/pkgs/by-name/op/openscad-unstable/thrust-cmake.patch new file mode 100644 index 000000000000..56422f099218 --- /dev/null +++ b/pkgs/by-name/op/openscad-unstable/thrust-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/thrust/thrust/cmake/thrust-header-search.cmake.in b/thrust/thrust/cmake/thrust-header-search.cmake.in +index 8529d89fe..94879ee01 100644 +--- a/thrust/thrust/cmake/thrust-header-search.cmake.in ++++ b/thrust/thrust/cmake/thrust-header-search.cmake.in +@@ -7,7 +7,6 @@ set(from_install_prefix "@from_install_prefix@") + find_path(_THRUST_VERSION_INCLUDE_DIR thrust/version.h + NO_CMAKE_FIND_ROOT_PATH # Don't allow CMake to re-root the search + NO_DEFAULT_PATH # Only search explicit paths below: +- PATHS +- "${CMAKE_CURRENT_LIST_DIR}/${from_install_prefix}/@CMAKE_INSTALL_INCLUDEDIR@" ++ PATHS "@CMAKE_INSTALL_INCLUDEDIR@" + ) + set_property(CACHE _THRUST_VERSION_INCLUDE_DIR PROPERTY TYPE INTERNAL)