1 { lib, fetchFromGitHub, fetchpatch, makeDesktopItem, wxGTK31, prusa-slicer, libspnav }:
3 appname = "SuperSlicer";
4 pname = "super-slicer";
5 description = "PrusaSlicer fork with more features and faster development cycle";
8 # Fix compile error with boost 1.79. See https://github.com/supermerill/SuperSlicer/issues/2823
10 url = "https://raw.githubusercontent.com/gentoo/gentoo/81e3ca3b7c131e8345aede89e3bbcd700e1ad567/media-gfx/superslicer/files/superslicer-2.4.58.3-boost-1.79-port-v2.patch";
11 # Excludes Linux-only patches
13 "src/slic3r/GUI/FreeCADDialog.cpp"
14 "src/slic3r/GUI/Tab.cpp"
15 "src/slic3r/Utils/Http.cpp"
17 sha256 = "sha256-v0q2MhySayij7+qBTE5q01IOq/DyUcWnjpbzB/AV34c=";
19 ./meshboolean-const.patch
24 version = "2.3.57.12";
25 sha256 = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw==";
30 sha256 = "sha256-UywxEGedXaBUTKojEkbkuejI6SdPSkPxTJMwUDNW6W0=";
35 sha256 = "sha256-4ivhkcvVw5NlPsDz3J840aWc0qnp/XzCnTTCICwi3/c=";
40 override = { version, sha256, patches }: super: {
41 inherit version pname patches;
43 src = fetchFromGitHub {
44 owner = "supermerill";
48 fetchSubmodules = true;
51 # - wxScintilla is not used on macOS
52 # - Partially applied upstream changes cause a bug when trying to link against a nonexistent libexpat
53 prePatch = super.prePatch + ''
54 substituteInPlace src/CMakeLists.txt \
55 --replace "scintilla" "" \
56 --replace "list(APPEND wxWidgets_LIBRARIES libexpat)" "list(APPEND wxWidgets_LIBRARIES EXPAT::EXPAT)"
58 substituteInPlace src/libslic3r/CMakeLists.txt \
59 --replace "libexpat" "EXPAT::EXPAT"
62 # We don't need PS overrides anymore, and gcode-viewer is embedded in the binary.
64 separateDebugInfo = true;
66 buildInputs = super.buildInputs ++ [
75 comment = description;
76 desktopName = appname;
77 genericName = "3D printer tool";
78 categories = [ "Development" ];
84 homepage = "https://github.com/supermerill/SuperSlicer";
85 license = licenses.agpl3Plus;
86 maintainers = with maintainers; [ cab404 moredread tmarkus ];
87 mainProgram = "superslicer";
90 passthru = allVersions;
93 wxGTK31-prusa = wxGTK31.overrideAttrs (old: rec {
94 pname = "wxwidgets-prusa3d-patched";
96 src = fetchFromGitHub {
99 rev = "489f6118256853cf5b299d595868641938566cdb";
100 hash = "sha256-xGL5I2+bPjmZGSTYe1L7VAmvLHbwd934o/cxg9baEvQ=";
101 fetchSubmodules = true;
104 prusa-slicer-wxGTK-override = prusa-slicer.override { wxGTK-override = wxGTK31-prusa; };
105 allVersions = builtins.mapAttrs (_name: version: (prusa-slicer-wxGTK-override.overrideAttrs (override version))) versions;