prusa-slicer: 2.9.0 -> 2.9.2 (#417043)

This commit is contained in:
Arne Keller
2025-06-16 14:26:26 +02:00
committed by GitHub
3 changed files with 30 additions and 70 deletions
+25 -28
View File
@@ -3,7 +3,6 @@
lib,
binutils,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
wrapGAppsHook3,
@@ -33,11 +32,12 @@
xorg,
libbgcode,
heatshrink,
catch2,
catch2_3,
webkitgtk_4_1,
ctestCheckHook,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
z3,
wxGTK-override ? null,
opencascade-override ? null,
}:
@@ -60,36 +60,30 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "prusa-slicer";
version = "2.9.0";
version = "2.9.2";
src = fetchFromGitHub {
owner = "prusa3d";
repo = "PrusaSlicer";
hash = "sha256-6BrmTNIiu6oI/CbKPKoFQIh1aHEVfJPIkxomQou0xKk=";
hash = "sha256-j/fdEgcFq0nWBLpyapwZIbBIXCnqEWV6Tk+6sTHk/Bc=";
rev = "version_${finalAttrs.version}";
};
# https://github.com/prusa3d/PrusaSlicer/pull/14010
patches = [
(fetchpatch {
url = "https://github.com/prusa3d/PrusaSlicer/commit/cdc3db58f9002778a0ca74517865527f50ade4c3.patch";
hash = "sha256-zgpGg1jtdnCBaWjR6oUcHo5sGuZx5oEzpux3dpRdMAM=";
})
# https://github.com/prusa3d/PrusaSlicer/pull/11769
./fix-ambiguous-constructors.patch
];
# Patch required for GCC 14.
# (not applicable to super-slicer fork)
# Make Gcode viewer open newer bgcode files.
postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") ''
substituteInPlace src/slic3r-arrange/include/arrange/DataStoreTraits.hpp \
--replace-fail \
"WritableDataStoreTraits<ArrItem>::template set" \
"WritableDataStoreTraits<ArrItem>::set"
substituteInPlace src/platform/unix/PrusaGcodeviewer.desktop \
--replace-fail 'MimeType=text/x.gcode;' 'MimeType=application/x-bgcode;text/x.gcode;'
'';
postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") (
# Patch required for GCC 14, but breaks on clang
lib.optionalString stdenv.cc.isGNU ''
substituteInPlace src/slic3r-arrange/include/arrange/DataStoreTraits.hpp \
--replace-fail \
"WritableDataStoreTraits<ArrItem>::template set" \
"WritableDataStoreTraits<ArrItem>::set"
''
# Make Gcode viewer open newer bgcode files.
+ ''
substituteInPlace src/platform/unix/PrusaGcodeviewer.desktop \
--replace-fail 'MimeType=text/x.gcode;' 'MimeType=application/x-bgcode;text/x.gcode;'
''
);
nativeBuildInputs = [
cmake
@@ -127,8 +121,9 @@ stdenv.mkDerivation (finalAttrs: {
xorg.libX11
libbgcode
heatshrink
catch2
catch2_3
webkitgtk_4_1
z3
]
++ lib.optionals withSystemd [
systemd
@@ -161,7 +156,7 @@ stdenv.mkDerivation (finalAttrs: {
# dlopen(3) for context.
if [ -f "src/libslic3r/Format/STEP.cpp" ]; then
substituteInPlace src/libslic3r/Format/STEP.cpp \
--replace 'libpath /= "OCCTWrapper.so";' 'libpath = "OCCTWrapper.so";'
--replace-fail 'libpath /= "OCCTWrapper.so";' 'libpath = "OCCTWrapper.so";'
fi
# https://github.com/prusa3d/PrusaSlicer/issues/9581
if [ -f "cmake/modules/FindEXPAT.cmake" ]; then
@@ -169,8 +164,10 @@ stdenv.mkDerivation (finalAttrs: {
fi
# Fix resources folder location on macOS
substituteInPlace src/PrusaSlicer.cpp \
--replace "#ifdef __APPLE__" "#if 0"
substituteInPlace src/${
if finalAttrs.pname == "prusa-slicer" then "CLI/Setup.cpp" else "PrusaSlicer.cpp"
} \
--replace-fail "#ifdef __APPLE__" "#if 0"
'';
cmakeFlags = [
@@ -1,37 +0,0 @@
From 910328f3131e24e330808f5d4cb814454dbe201d Mon Sep 17 00:00:00 2001
From: Gregor Riepl <onitake@gmail.com>
Date: Mon, 27 Nov 2023 13:01:55 +0100
Subject: [PATCH] Make initializers explicit to avoid ambiguous wxArrayString
overloads
---
src/slic3r/GUI/PhysicalPrinterDialog.cpp | 2 +-
src/slic3r/GUI/Plater.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
index 849e987c731..7d0c628c23f 100644
--- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp
+++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
@@ -607,7 +607,7 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
// Always fill in the "printhost_port" combo box from the config and select it.
{
Choice* choice = dynamic_cast<Choice*>(m_optgroup->get_field("printhost_port"));
- choice->set_values({ m_config->opt_string("printhost_port") });
+ choice->set_values(std::vector<std::string>({ m_config->opt_string("printhost_port") }));
choice->set_selection();
}
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index debfe625fd4..4d61e29a2dc 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -4420,7 +4420,7 @@ void Plater::load_project(const wxString& filename)
s_multiple_beds.set_loading_project_flag(true);
ScopeGuard guard([](){ s_multiple_beds.set_loading_project_flag(false);});
- if (! load_files({ into_path(filename) }).empty()) {
+ if (! load_files(std::vector<boost::filesystem::path>({ into_path(filename) })).empty()) {
// At least one file was loaded.
p->set_project_filename(filename);
// Save the names of active presets and project specific config into ProjectDirtyStateManager.
+5 -5
View File
@@ -7,17 +7,17 @@
heatshrink,
zlib,
boost,
catch2,
catch2_3,
}:
stdenv.mkDerivation {
pname = "libbgcode";
version = "2023-11-16";
version = "0-unstable-2025-02-19";
src = fetchFromGitHub {
owner = "prusa3d";
repo = "libbgcode";
rev = "bc390aab4427589a6402b4c7f65cf4d0a8f987ec";
hash = "sha256-TZShYeDAh+fNdmTr1Xqctji9f0vEGpNZv1ba/IY5EoY=";
rev = "5041c093b33e2748e76d6b326f2251310823f3df";
hash = "sha256-EaxVZerH2v8b1Yqk+RW/r3BvnJvrAelkKf8Bd+EHbEc=";
};
nativeBuildInputs = [
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
heatshrink
zlib
boost
catch2
catch2_3
];
meta = with lib; {