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=";
23 version = "2.3.57.12";
24 sha256 = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw==";
29 sha256 = "sha256-UywxEGedXaBUTKojEkbkuejI6SdPSkPxTJMwUDNW6W0=";
34 sha256 = "sha256-IgE+NWy2DUrPR2ROfK1F67e8B3eoM9yRVQ0GZTxJ42I=";
39 override = { version, sha256, patches }: super: {
40 inherit version pname patches;
42 src = fetchFromGitHub {
43 owner = "supermerill";
47 fetchSubmodules = true;
50 # - wxScintilla is not used on macOS
51 # - Partially applied upstream changes cause a bug when trying to link against a nonexistent libexpat
52 prePatch = super.prePatch + ''
53 substituteInPlace src/CMakeLists.txt \
54 --replace "scintilla" "" \
55 --replace "list(APPEND wxWidgets_LIBRARIES libexpat)" "list(APPEND wxWidgets_LIBRARIES EXPAT::EXPAT)"
57 substituteInPlace src/libslic3r/CMakeLists.txt \
58 --replace "libexpat" "EXPAT::EXPAT"
61 # We don't need PS overrides anymore, and gcode-viewer is embedded in the binary.
63 separateDebugInfo = true;
65 buildInputs = super.buildInputs ++ [
74 comment = description;
75 desktopName = appname;
76 genericName = "3D printer tool";
77 categories = [ "Development" ];
83 homepage = "https://github.com/supermerill/SuperSlicer";
84 license = licenses.agpl3;
85 maintainers = with maintainers; [ cab404 moredread tmarkus ];
86 mainProgram = "superslicer";
89 passthru = allVersions;
92 wxGTK31-prusa = wxGTK31.overrideAttrs (old: rec {
93 pname = "wxwidgets-prusa3d-patched";
95 src = fetchFromGitHub {
98 rev = "489f6118256853cf5b299d595868641938566cdb";
99 hash = "sha256-xGL5I2+bPjmZGSTYe1L7VAmvLHbwd934o/cxg9baEvQ=";
100 fetchSubmodules = true;
103 prusa-slicer-wxGTK-override = prusa-slicer.override { wxGTK-override = wxGTK31-prusa; };
104 allVersions = builtins.mapAttrs (_name: version: (prusa-slicer-wxGTK-override.overrideAttrs (override version))) versions;