From e6967ae9e9b5b2adf3782d0c33fb02cde21e31a4 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 7 Jul 2024 20:21:47 -0400 Subject: [PATCH] prusa-slicer: 2.7.4 -> 2.8.0 --- .../misc/prusa-slicer/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index a9d78e9884e11..159b0e0aebc54 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -2,6 +2,7 @@ , lib , binutils , fetchFromGitHub +, fetchpatch , cmake , pkg-config , wrapGAppsHook3 @@ -15,6 +16,7 @@ , expat , glew , glib +, glib-networking , gmp , gtk3 , hicolor-icon-theme @@ -64,15 +66,27 @@ let }); openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_11; }; wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override; + + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch"; + hash = "sha256-/R9jv9zSP1lDW6IltZ8V06xyLdxfaYrk3zD6JRFUxHg="; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch"; + hash = "sha256-G1JNdVH+goBelag9aX0NctHFVqtoYFnqjwK/43FVgvM="; + }) + ]; in stdenv.mkDerivation (finalAttrs: { pname = "prusa-slicer"; - version = "2.7.4"; + version = "2.8.0"; + inherit patches; src = fetchFromGitHub { owner = "prusa3d"; repo = "PrusaSlicer"; - hash = "sha256-g2I2l6i/8p8werDs4mDI/lGeDQsma4WSB9vT6OB2LGg="; + hash = "sha256-A/uxNIEXCchLw3t5erWdhqFAeh6nudcMfASi+RoJkFg="; rev = "version_${finalAttrs.version}"; }; @@ -93,6 +107,7 @@ stdenv.mkDerivation (finalAttrs: { expat glew glib + glib-networking gmp gtk3 hicolor-icon-theme @@ -128,9 +143,6 @@ stdenv.mkDerivation (finalAttrs: { # prusa-slicer uses dlopen on `libudev.so` at runtime NIX_LDFLAGS = lib.optionalString withSystemd "-ludev"; - # FIXME: remove in 2.8.0 - NIX_CFLAGS_COMPILE = "-Wno-enum-constexpr-conversion"; - prePatch = '' # Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx # now seems to be integrated into the main lib.