2023-11-16 04:20:00 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, makeDesktopItem, wxGTK31, prusa-slicer, libspnav }:
|
2020-09-25 04:45:31 +00:00
|
|
|
let
|
|
|
|
appname = "SuperSlicer";
|
|
|
|
pname = "super-slicer";
|
|
|
|
description = "PrusaSlicer fork with more features and faster development cycle";
|
2021-09-23 15:35:13 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# Fix compile error with boost 1.79. See https://github.com/supermerill/SuperSlicer/issues/2823
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/gentoo/gentoo/81e3ca3b7c131e8345aede89e3bbcd700e1ad567/media-gfx/superslicer/files/superslicer-2.4.58.3-boost-1.79-port-v2.patch";
|
|
|
|
# Excludes Linux-only patches
|
|
|
|
excludes = [
|
|
|
|
"src/slic3r/GUI/FreeCADDialog.cpp"
|
|
|
|
"src/slic3r/GUI/Tab.cpp"
|
|
|
|
"src/slic3r/Utils/Http.cpp"
|
|
|
|
];
|
|
|
|
sha256 = "sha256-v0q2MhySayij7+qBTE5q01IOq/DyUcWnjpbzB/AV34c=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
versions = {
|
2022-07-18 16:21:45 +00:00
|
|
|
stable = {
|
|
|
|
version = "2.3.57.12";
|
|
|
|
sha256 = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw==";
|
|
|
|
patches = null;
|
|
|
|
};
|
|
|
|
latest = {
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.4.58.5";
|
|
|
|
sha256 = "sha256-UywxEGedXaBUTKojEkbkuejI6SdPSkPxTJMwUDNW6W0=";
|
|
|
|
inherit patches;
|
|
|
|
};
|
|
|
|
beta = {
|
|
|
|
version = "2.5.59.2";
|
|
|
|
sha256 = "sha256-IgE+NWy2DUrPR2ROfK1F67e8B3eoM9yRVQ0GZTxJ42I=";
|
|
|
|
inherit patches;
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
2021-09-23 15:35:13 +00:00
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
override = { version, sha256, patches }: super: {
|
|
|
|
inherit version pname patches;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "supermerill";
|
|
|
|
repo = "SuperSlicer";
|
2021-09-23 15:35:13 +00:00
|
|
|
inherit sha256;
|
2020-09-25 04:45:31 +00:00
|
|
|
rev = version;
|
2021-06-28 23:13:55 +00:00
|
|
|
fetchSubmodules = true;
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# - wxScintilla is not used on macOS
|
|
|
|
# - Partially applied upstream changes cause a bug when trying to link against a nonexistent libexpat
|
2022-12-02 08:20:57 +00:00
|
|
|
prePatch = super.prePatch + ''
|
|
|
|
substituteInPlace src/CMakeLists.txt \
|
2023-11-16 04:20:00 +00:00
|
|
|
--replace "scintilla" "" \
|
|
|
|
--replace "list(APPEND wxWidgets_LIBRARIES libexpat)" "list(APPEND wxWidgets_LIBRARIES EXPAT::EXPAT)"
|
|
|
|
|
|
|
|
substituteInPlace src/libslic3r/CMakeLists.txt \
|
|
|
|
--replace "libexpat" "EXPAT::EXPAT"
|
2022-12-02 08:20:57 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# We don't need PS overrides anymore, and gcode-viewer is embedded in the binary.
|
|
|
|
postInstall = null;
|
2021-09-18 10:52:07 +00:00
|
|
|
separateDebugInfo = true;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildInputs = super.buildInputs ++ [
|
|
|
|
libspnav
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
2022-03-05 16:20:37 +00:00
|
|
|
name = "superslicer";
|
2021-02-05 17:12:51 +00:00
|
|
|
exec = "superslicer";
|
|
|
|
icon = appname;
|
|
|
|
comment = description;
|
|
|
|
desktopName = appname;
|
|
|
|
genericName = "3D printer tool";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Development" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
})
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit description;
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://github.com/supermerill/SuperSlicer";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.agpl3;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ cab404 moredread tmarkus ];
|
2021-12-19 01:06:50 +00:00
|
|
|
mainProgram = "superslicer";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
passthru = allVersions;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
2023-08-10 07:59:29 +00:00
|
|
|
wxGTK31-prusa = wxGTK31.overrideAttrs (old: rec {
|
|
|
|
pname = "wxwidgets-prusa3d-patched";
|
|
|
|
version = "3.1.4";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "prusa3d";
|
|
|
|
repo = "wxWidgets";
|
|
|
|
rev = "489f6118256853cf5b299d595868641938566cdb";
|
|
|
|
hash = "sha256-xGL5I2+bPjmZGSTYe1L7VAmvLHbwd934o/cxg9baEvQ=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
prusa-slicer-wxGTK-override = prusa-slicer.override { wxGTK-override = wxGTK31-prusa; };
|
|
|
|
allVersions = builtins.mapAttrs (_name: version: (prusa-slicer-wxGTK-override.overrideAttrs (override version))) versions;
|
2021-09-23 15:35:13 +00:00
|
|
|
in
|
|
|
|
allVersions.stable
|