feat: Remove orcaslicer package.nix
This commit is contained in:
@@ -1,235 +0,0 @@
|
|||||||
{
|
|
||||||
stdenv,
|
|
||||||
lib,
|
|
||||||
binutils,
|
|
||||||
fetchFromGitHub,
|
|
||||||
fetchpatch,
|
|
||||||
cmake,
|
|
||||||
pkg-config,
|
|
||||||
wrapGAppsHook3,
|
|
||||||
boost186,
|
|
||||||
cereal,
|
|
||||||
cgal,
|
|
||||||
curl,
|
|
||||||
dbus,
|
|
||||||
eigen,
|
|
||||||
expat,
|
|
||||||
ffmpeg,
|
|
||||||
gcc-unwrapped,
|
|
||||||
glew,
|
|
||||||
glfw,
|
|
||||||
glib,
|
|
||||||
glib-networking,
|
|
||||||
gmp,
|
|
||||||
gst_all_1,
|
|
||||||
gtest,
|
|
||||||
gtk3,
|
|
||||||
hicolor-icon-theme,
|
|
||||||
ilmbase,
|
|
||||||
libpng,
|
|
||||||
mpfr,
|
|
||||||
nlopt,
|
|
||||||
opencascade-occt_7_6,
|
|
||||||
openvdb,
|
|
||||||
opencv,
|
|
||||||
pcre,
|
|
||||||
systemd,
|
|
||||||
tbb_2021,
|
|
||||||
webkitgtk_4_1,
|
|
||||||
wxGTK32,
|
|
||||||
xorg,
|
|
||||||
libnoise,
|
|
||||||
withSystemd ? stdenv.hostPlatform.isLinux,
|
|
||||||
}: let
|
|
||||||
wxGTK' =
|
|
||||||
(wxGTK32.override {
|
|
||||||
# withCurl = true;
|
|
||||||
# withPrivateFonts = true;
|
|
||||||
withWebKit = true;
|
|
||||||
}).overrideAttrs
|
|
||||||
(old: {
|
|
||||||
configureFlags =
|
|
||||||
old.configureFlags
|
|
||||||
++ [
|
|
||||||
# Disable noisy debug dialogs
|
|
||||||
"--enable-debug=no"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "orca-slicer";
|
|
||||||
version = "v2.3.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "SoftFever";
|
|
||||||
repo = "OrcaSlicer";
|
|
||||||
tag = finalAttrs.version;
|
|
||||||
hash = "sha256-MEa57jFBJkqwoAkqI7wXOn1X1zxgLQt3SNeanfD88kU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
pkg-config
|
|
||||||
wrapGAppsHook3
|
|
||||||
wxGTK'
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs =
|
|
||||||
[
|
|
||||||
binutils
|
|
||||||
(boost186.override {
|
|
||||||
enableShared = true;
|
|
||||||
enableStatic = false;
|
|
||||||
extraFeatures = [
|
|
||||||
"log"
|
|
||||||
"thread"
|
|
||||||
"filesystem"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
boost186.dev
|
|
||||||
cereal
|
|
||||||
cgal
|
|
||||||
curl
|
|
||||||
dbus
|
|
||||||
eigen
|
|
||||||
expat
|
|
||||||
ffmpeg
|
|
||||||
gcc-unwrapped
|
|
||||||
glew
|
|
||||||
glfw
|
|
||||||
glib
|
|
||||||
glib-networking
|
|
||||||
gmp
|
|
||||||
gst_all_1.gstreamer
|
|
||||||
gst_all_1.gst-plugins-base
|
|
||||||
gst_all_1.gst-plugins-bad
|
|
||||||
gst_all_1.gst-plugins-good
|
|
||||||
gtk3
|
|
||||||
hicolor-icon-theme
|
|
||||||
ilmbase
|
|
||||||
libpng
|
|
||||||
mpfr
|
|
||||||
nlopt
|
|
||||||
opencascade-occt_7_6
|
|
||||||
openvdb
|
|
||||||
pcre
|
|
||||||
tbb_2021
|
|
||||||
webkitgtk_4_1
|
|
||||||
wxGTK'
|
|
||||||
xorg.libX11
|
|
||||||
opencv.cxxdev
|
|
||||||
libnoise
|
|
||||||
]
|
|
||||||
++ lib.optionals withSystemd [systemd]
|
|
||||||
++ finalAttrs.checkInputs;
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fix for webkitgtk linking
|
|
||||||
./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
|
|
||||||
# Link opencv_core and opencv_imgproc instead of opencv_world
|
|
||||||
./patches/dont-link-opencv-world-orca.patch
|
|
||||||
# Don't link osmesa
|
|
||||||
./patches/no-osmesa.patch
|
|
||||||
# The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged
|
|
||||||
# Allows disabling the update nag screen
|
|
||||||
(fetchpatch {
|
|
||||||
name = "pr-7650-configurable-update-check.patch";
|
|
||||||
url = "https://github.com/SoftFever/OrcaSlicer/commit/d10a06ae11089cd1f63705e87f558e9392f7a167.patch";
|
|
||||||
hash = "sha256-t4own5AwPsLYBsGA15id5IH1ngM0NSuWdFsrxMRXmTk=";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://gitlab.archlinux.org/schiele/prusa-slicer/-/raw/8acd24c8e0c21b0753f33416e63f8b54b82609ff/allow_wayland.patch?inline=false";
|
|
||||||
hash = "sha256-C2eg7Z2ghegP0ZWLF4LxLemhMi5Mt7g5dLOtxcvlq+k=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = true;
|
|
||||||
checkInputs = [gtest];
|
|
||||||
|
|
||||||
separateDebugInfo = true;
|
|
||||||
|
|
||||||
NLOPT = nlopt;
|
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = toString (
|
|
||||||
[
|
|
||||||
"-Wno-ignored-attributes"
|
|
||||||
"-I${opencv.out}/include/opencv4"
|
|
||||||
"-Wno-error=incompatible-pointer-types"
|
|
||||||
"-Wno-template-id-cdtor"
|
|
||||||
"-Wno-uninitialized"
|
|
||||||
"-Wno-unused-result"
|
|
||||||
"-Wno-deprecated-declarations"
|
|
||||||
"-Wno-use-after-free"
|
|
||||||
"-Wno-format-overflow"
|
|
||||||
"-Wno-stringop-overflow"
|
|
||||||
"-DBOOST_ALLOW_DEPRECATED_HEADERS"
|
|
||||||
"-DBOOST_MATH_DISABLE_STD_FPCLASSIFY"
|
|
||||||
"-DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS"
|
|
||||||
"-DBOOST_MATH_DISABLE_FLOAT128"
|
|
||||||
"-DBOOST_MATH_NO_QUAD_SUPPORT"
|
|
||||||
"-DBOOST_MATH_MAX_FLOAT128_DIGITS=0"
|
|
||||||
"-DBOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT"
|
|
||||||
"-DBOOST_MATH_DISABLE_FLOAT128_BUILTIN_FPCLASSIFY"
|
|
||||||
]
|
|
||||||
# Making it compatible with GCC 14+, see https://github.com/SoftFever/OrcaSlicer/pull/7710
|
|
||||||
++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "14") [
|
|
||||||
"-Wno-error=template-id-cdtor"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
NIX_LDFLAGS = toString [
|
|
||||||
(lib.optionalString withSystemd "-ludev")
|
|
||||||
"-L${boost186}/lib"
|
|
||||||
"-lboost_log"
|
|
||||||
"-lboost_log_setup"
|
|
||||||
];
|
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
sed -i 's|nlopt_cxx|nlopt|g' cmake/modules/FindNLopt.cmake
|
|
||||||
sed -i 's|"libnoise/noise.h"|"noise/noise.h"|' src/libslic3r/PerimeterGenerator.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
(lib.cmakeBool "SLIC3R_STATIC" false)
|
|
||||||
(lib.cmakeBool "SLIC3R_FHS" true)
|
|
||||||
(lib.cmakeFeature "SLIC3R_GTK" "3")
|
|
||||||
(lib.cmakeBool "BBL_RELEASE_TO_PUBLIC" true)
|
|
||||||
(lib.cmakeBool "BBL_INTERNAL_TESTING" false)
|
|
||||||
(lib.cmakeBool "SLIC3R_BUILD_TESTS" false)
|
|
||||||
(lib.cmakeFeature "CMAKE_CXX_FLAGS" "-DGL_SILENCE_DEPRECATION")
|
|
||||||
(lib.cmakeFeature "CMAKE_EXE_LINKER_FLAGS" "-Wl,--no-as-needed")
|
|
||||||
(lib.cmakeBool "ORCA_VERSION_CHECK_DEFAULT" false)
|
|
||||||
(lib.cmakeFeature "LIBNOISE_INCLUDE_DIR" "${libnoise}/include/noise")
|
|
||||||
(lib.cmakeFeature "LIBNOISE_LIBRARY" "${libnoise}/lib/libnoise-static.a")
|
|
||||||
"-Wno-dev"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Generate translation files
|
|
||||||
postBuild = "( cd .. && ./run_gettext.sh )";
|
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
gappsWrapperArgs+=(
|
|
||||||
--prefix LD_LIBRARY_PATH : "$out/lib:${
|
|
||||||
lib.makeLibraryPath [
|
|
||||||
glew
|
|
||||||
]
|
|
||||||
}"
|
|
||||||
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)";
|
|
||||||
homepage = "https://github.com/SoftFever/OrcaSlicer";
|
|
||||||
changelog = "https://github.com/SoftFever/OrcaSlicer/releases/tag/v${finalAttrs.version}";
|
|
||||||
license = lib.licenses.agpl3Only;
|
|
||||||
maintainers = with lib.maintainers; [
|
|
||||||
zhaofengli
|
|
||||||
ovlach
|
|
||||||
pinpox
|
|
||||||
liberodark
|
|
||||||
];
|
|
||||||
mainProgram = "orca-slicer";
|
|
||||||
platforms = lib.platforms.linux;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
From 7eed499898226222a949a792e0400ec10db4a1c9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zhaofeng Li <hello@zhaofeng.li>
|
|
||||||
Date: Tue, 22 Nov 2022 13:00:39 -0700
|
|
||||||
Subject: [PATCH] [not for upstream] CMakeLists: Link against webkit2gtk in
|
|
||||||
libslic3r_gui
|
|
||||||
|
|
||||||
WebView.cpp uses symbols from webkitgtk directly. Upstream setup
|
|
||||||
links wxGTK statically so webkitgtk is already pulled in.
|
|
||||||
|
|
||||||
> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: slic3r/liblibslic3r_gui.a(WebView.cpp.o): undefined reference to symbol 'webkit_web_view_run_javascript_finish'
|
|
||||||
> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/8yvy428jy2nwq4dhmrcs7gj5r27a2pv6-webkitgtk-2.38.2+abi=4.0/lib/libwebkit2gtk-4.0.so.37: error adding symbols: DSO missing from command line
|
|
||||||
---
|
|
||||||
src/CMakeLists.txt | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index 9c5cb96..e92a0e3 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -175,6 +175,11 @@ if (WIN32)
|
|
||||||
target_link_libraries(BambuStudio_app_gui PRIVATE boost_headeronly)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
+# We link against webkit2gtk symbols in src/slic3r/GUI/Widgets/WebView.cpp
|
|
||||||
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
||||||
+ target_link_libraries(libslic3r_gui "-lwebkit2gtk-4.0")
|
|
||||||
+endif ()
|
|
||||||
+
|
|
||||||
# Link the resources dir to where Slic3r GUI expects it
|
|
||||||
set(output_dlls_Release "")
|
|
||||||
set(output_dlls_Debug "")
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
commit c9282b73f3d09daff23a2603addd94605596ebe7
|
|
||||||
Author: Robert Schiele <rschiele@gmail.com>
|
|
||||||
Date: Thu May 8 19:16:46 2025 +0200
|
|
||||||
|
|
||||||
remove forcing GDK_BACKEND to x11
|
|
||||||
|
|
||||||
It seems the problems on Wayland from the past are removed meanwhile.
|
|
||||||
|
|
||||||
diff --git a/src/CLI/GuiParams.cpp b/src/CLI/GuiParams.cpp
|
|
||||||
index f44b91651f..41b42ff368 100644
|
|
||||||
--- a/src/CLI/GuiParams.cpp
|
|
||||||
+++ b/src/CLI/GuiParams.cpp
|
|
||||||
@@ -107,9 +107,8 @@ int start_gui_with_params(GUI::GUI_InitParams& params)
|
|
||||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
|
||||||
// likely some linux / unix system
|
|
||||||
const char* display = boost::nowide::getenv("DISPLAY");
|
|
||||||
- // const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
|
|
||||||
- //if (! ((display && *display) || (wayland_display && *wayland_display))) {
|
|
||||||
- if (!(display && *display)) {
|
|
||||||
+ const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
|
|
||||||
+ if (! ((display && *display) || (wayland_display && *wayland_display))) {
|
|
||||||
// DISPLAY not set.
|
|
||||||
boost::nowide::cerr << "DISPLAY not set, GUI mode not available." << std::endl << std::endl;
|
|
||||||
print_help(false);
|
|
||||||
@@ -141,4 +140,4 @@ int start_as_gcode_viewer(GUI::GUI_InitParams& gui_params)
|
|
||||||
}
|
|
||||||
#else // SLIC3R_GUI
|
|
||||||
// If there is no GUI, we shall ignore the parameters. Remove them from the list.
|
|
||||||
-#endif // SLIC3R_GUI
|
|
||||||
\ No newline at end of file
|
|
||||||
+#endif // SLIC3R_GUI
|
|
||||||
diff --git a/src/CLI/Setup.cpp b/src/CLI/Setup.cpp
|
|
||||||
index 82e03d466d..95acdf3477 100644
|
|
||||||
--- a/src/CLI/Setup.cpp
|
|
||||||
+++ b/src/CLI/Setup.cpp
|
|
||||||
@@ -212,11 +212,6 @@ static bool setup_common()
|
|
||||||
save_main_thread_id();
|
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
|
||||||
- // On Linux, wxGTK has no support for Wayland, and the app crashes on
|
|
||||||
- // startup if gtk3 is used. This env var has to be set explicitly to
|
|
||||||
- // instruct the window manager to fall back to X server mode.
|
|
||||||
- ::setenv("GDK_BACKEND", "x11", /* replace */ true);
|
|
||||||
-
|
|
||||||
// https://github.com/prusa3d/PrusaSlicer/issues/12969
|
|
||||||
::setenv("WEBKIT_DISABLE_COMPOSITING_MODE", "1", /* replace */ false);
|
|
||||||
::setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1", /* replace */ false);
|
|
||||||
@@ -338,4 +333,4 @@ bool setup(Data& cli, int argc, char** argv)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
-}
|
|
||||||
\ No newline at end of file
|
|
||||||
+}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
|
|
||||||
index 64e0a9e87..e14f29488 100644
|
|
||||||
--- a/src/libslic3r/CMakeLists.txt
|
|
||||||
+++ b/src/libslic3r/CMakeLists.txt
|
|
||||||
@@ -576,7 +576,8 @@ target_link_libraries(libslic3r
|
|
||||||
mcut
|
|
||||||
JPEG::JPEG
|
|
||||||
qoi
|
|
||||||
- opencv_world
|
|
||||||
+ opencv_core
|
|
||||||
+ opencv_imgproc
|
|
||||||
noise::noise
|
|
||||||
)
|
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
|
|
||||||
index e695acd48..174e233e6 100644
|
|
||||||
--- a/src/slic3r/CMakeLists.txt
|
|
||||||
+++ b/src/slic3r/CMakeLists.txt
|
|
||||||
@@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
||||||
FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl)
|
|
||||||
FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client)
|
|
||||||
find_package(CURL REQUIRED)
|
|
||||||
- target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa)
|
|
||||||
+ target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
|
|
||||||
target_link_libraries(libslic3r_gui
|
|
||||||
OpenGL::EGL
|
|
||||||
${WAYLAND_SERVER_LIBRARIES}
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
(auth) {
|
(auth) {
|
||||||
forward_auth https://auth.darksailor.dev {
|
forward_auth https://auth.darksailor.dev {
|
||||||
header_up Host {upstream_hostport}
|
header_up X-Forwarded-Host {upstream_hostport}
|
||||||
uri /api/authz/forward-auth
|
uri /api/authz/forward-auth
|
||||||
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user