openscad-unstable: 2025-06-04 -> 2021.01-unstable-2025-11-27, fix build

This commit is contained in:
7c6f434c
2025-10-28 23:11:00 +01:00
parent a7fc50310a
commit f39a477c9d
2 changed files with 29 additions and 65 deletions
+29 -23
View File
@@ -44,33 +44,29 @@
ctestCheckHook,
}:
# clang consume much less RAM than GCC
clangStdenv.mkDerivation rec {
pname = "openscad-unstable";
version = "2025-06-04";
src = fetchFromGitHub {
owner = "openscad";
repo = "openscad";
rev = "65856c9330f8cc4ffcaccf03d91b4217f2eae28d";
hash = "sha256-jozcLFGVSfw8G12oSxHjqUyFtAfENgIByID+omk08mU=";
fetchSubmodules = true; # Only really need sanitizers-cmake and MCAD and manifold
};
patches = [ ./test.diff ];
# fix use of our lib3mf cmake export instead of finder
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"Lib3MF" \
"lib3mf"
'';
nativeBuildInputs = [
(python3.withPackages (
let
python3withPackages = (
python3.withPackages (
ps: with ps; [
numpy
pillow
]
))
)
);
in
clangStdenv.mkDerivation rec {
pname = "openscad-unstable";
version = "2021.01-unstable-2025-10-27";
src = fetchFromGitHub {
owner = "openscad";
repo = "openscad";
rev = "aa785fe4ab3d52450a5e51eb73585ac9bbcc8798";
hash = "sha256-TngfItArYtm8243DdYkQlkfc/MBTZGYrf08hfloWRWk=";
fetchSubmodules = true; # Only really need sanitizers-cmake and MCAD and manifold
};
nativeBuildInputs = [
python3withPackages
bison
cmake
flex
@@ -134,6 +130,10 @@ clangStdenv.mkDerivation rec {
# The sources enable this for only apple. We turn it off globally anyway to stay
# consistent.
"-DUSE_QT6=OFF"
# For tests
"-DVENV_DIR=${python3withPackages}"
"-DVENV_BIN_PATH=${python3withPackages}/bin"
];
# tests rely on sysprof which is not available on darwin
@@ -147,6 +147,12 @@ clangStdenv.mkDerivation rec {
done )
'';
postPatch = ''
# Take Python3 executable as passed
sed -e '/set(VENV_DIR /d' -i tests/cmake/ImageCompare.cmake
sed -e '/find_path(VENV_BIN_PATH /d' -i tests/cmake/ImageCompare.cmake
'';
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/bin/*.app $out/Applications
@@ -1,42 +0,0 @@
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5c1b40af4..917451dee 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -59,13 +59,14 @@ if(USE_IMAGE_COMPARE_PY)
# Since msys2 on Windows prefers bin/ over Scripts, we need to look for the actual folder to determine
# how to utilize the venv
- find_path(VENV_BIN_PATH activate PATHS "${VENV_DIR}/bin" "${VENV_DIR}/Scripts" NO_DEFAULT_PATH NO_CACHE)
- if(WIN32)
- set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python.exe")
- else()
- set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python")
- endif()
- if(EXISTS "${IMAGE_COMPARE_EXE}")
+ # find_path(VENV_BIN_PATH activate PATHS "${VENV_DIR}/bin" "${VENV_DIR}/Scripts" NO_DEFAULT_PATH NO_CACHE)
+ # if(WIN32)
+ # set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python.exe")
+ # else()
+ # set(IMAGE_COMPARE_EXE "${VENV_BIN_PATH}/python")
+ # endif()
+ set(IMAGE_COMPARE_EXE "python3")
+ # if(EXISTS "${IMAGE_COMPARE_EXE}")
message(STATUS "venv found, testing libraries")
execute_process(
COMMAND "${IMAGE_COMPARE_EXE}" "${CCSD}/image_compare.py" "--status"
@@ -77,10 +78,10 @@ if(USE_IMAGE_COMPARE_PY)
message(STATUS "venv libraries complete")
set(BUILD_VENV FALSE)
endif()
- else()
- message(STATUS "venv not found")
- set(BUILD_VENV TRUE)
- endif()
+ # else()
+ # message(STATUS "venv not found")
+ # set(BUILD_VENV TRUE)
+ # endif()
if(BUILD_VENV)
message(STATUS "Setting up testing venv for image comparison")
execute_process(