diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8b9d764cd96b..de7d8cbb698e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5868,6 +5868,12 @@ githubId = 1931963; name = "David Sferruzza"; }; + dsluijk = { + name = "Dany Sluijk"; + email = "nix@dany.dev"; + github = "dsluijk"; + githubId = 8537327; + }; dstengele = { name = "Dennis Stengele"; email = "dennis@stengele.me"; diff --git a/pkgs/applications/misc/bambu-studio/default.nix b/pkgs/applications/misc/bambu-studio/default.nix index 4084734aa58e..481f36571706 100644 --- a/pkgs/applications/misc/bambu-studio/default.nix +++ b/pkgs/applications/misc/bambu-studio/default.nix @@ -22,10 +22,7 @@ glib, glib-networking, gmp, - gstreamer, - gst-plugins-base, - gst-plugins-bad, - gst-plugins-good, + gst_all_1, gtest, gtk3, hicolor-icon-theme, @@ -36,6 +33,7 @@ nlopt, opencascade-occt_7_6, openvdb, + opencv, pcre, systemd, tbb_2021_11, @@ -45,14 +43,20 @@ withSystemd ? stdenv.hostPlatform.isLinux, }: let - opencascade-occt = opencascade-occt_7_6; - wxGTK31' = wxGTK31.overrideAttrs (old: { - configureFlags = old.configureFlags ++ [ - # Disable noisy debug dialogs - "--enable-debug=no" - ]; - }); - openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: { + wxGTK' = + (wxGTK31.override { + withCurl = true; + withPrivateFonts = true; + withWebKit = true; + }).overrideAttrs + (old: { + configureFlags = old.configureFlags ++ [ + # Disable noisy debug dialogs + "--enable-debug=no" + ]; + }); + + openvdb' = openvdb.overrideAttrs (old: { buildInputs = [ openexr boost179 @@ -65,13 +69,13 @@ let in stdenv.mkDerivation rec { pname = "bambu-studio"; - version = "01.09.00.70"; + version = "01.09.07.52"; src = fetchFromGitHub { owner = "bambulab"; repo = "BambuStudio"; rev = "v${version}"; - hash = "sha256-RBctBhKo7mjxsP7OJhGfoU1eIiGVuMiAqwwSU+gsMds="; + hash = "sha256-fhH4N29P/ysdHHbZt+FnBl3+QtTNhbVE3j4ZnFJyJH0="; }; nativeBuildInputs = [ @@ -95,10 +99,10 @@ stdenv.mkDerivation rec { glib glib-networking gmp - gstreamer - gst-plugins-base - gst-plugins-bad - gst-plugins-good + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-good gtk3 hicolor-icon-theme ilmbase @@ -106,20 +110,23 @@ stdenv.mkDerivation rec { mesa.osmesa mpfr nlopt - opencascade-occt - openvdb_tbb_2021_8 + opencascade-occt_7_6 + openvdb' pcre tbb_2021_11 webkitgtk_4_0 - wxGTK31' + wxGTK' xorg.libX11 + opencv ] ++ lib.optionals withSystemd [ systemd ] ++ checkInputs; patches = [ # Fix for webkitgtk linking - ./0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch + ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch # Fix build with cgal-5.6.1+ - ./meshboolean-const.patch + ./patches/meshboolean-const.patch + # Fix an issue with + ./patches/dont-link-opencv-world-bambu.patch ]; doCheck = true; @@ -136,7 +143,10 @@ stdenv.mkDerivation rec { # Disable compiler warnings that clutter the build log. # It seems to be a known issue for Eigen: # http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221 - NIX_CFLAGS_COMPILE = "-Wno-ignored-attributes"; + NIX_CFLAGS_COMPILE = toString [ + "-Wno-ignored-attributes" + "-I${opencv.out}/include/opencv4" + ]; # prusa-slicer uses dlopen on `libudev.so` at runtime NIX_LDFLAGS = lib.optionalString withSystemd "-ludev"; @@ -181,8 +191,12 @@ stdenv.mkDerivation rec { meta = with lib; { description = "PC Software for BambuLab's 3D printers"; homepage = "https://github.com/bambulab/BambuStudio"; + changelog = "https://github.com/bambulab/BambuStudio/releases/tag/v${version}"; license = licenses.agpl3Plus; - maintainers = with maintainers; [ zhaofengli ]; + maintainers = with maintainers; [ + zhaofengli + dsluijk + ]; mainProgram = "bambu-studio"; platforms = platforms.linux; }; diff --git a/pkgs/applications/misc/bambu-studio/orca-slicer.nix b/pkgs/applications/misc/bambu-studio/orca-slicer.nix index 353252dfea17..db86a8c40815 100644 --- a/pkgs/applications/misc/bambu-studio/orca-slicer.nix +++ b/pkgs/applications/misc/bambu-studio/orca-slicer.nix @@ -2,7 +2,6 @@ lib, fetchFromGitHub, bambu-studio, - opencv, }: bambu-studio.overrideAttrs ( finalAttrs: previousAttrs: { @@ -16,20 +15,15 @@ bambu-studio.overrideAttrs ( hash = "sha256-7fusdSYpZb4sYl5L/+81PzMd42Nsejj+kCZsq0f7eIk="; }; - patches = - previousAttrs.patches - ++ [ - # FIXME: only required for 2.1.1, can be removed in the next version - ./0002-fix-build-for-gcc-13.diff - - ./dont-link-opencv-world.patch - ]; - - buildInputs = - previousAttrs.buildInputs - ++ [ - opencv - ]; + patches =[ + # FIXME: only required for 2.1.1, can be removed in the next version + ./patches/0002-fix-build-for-gcc-13.diff + # Fix for webkitgtk linking + ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch + # Fix build with cgal-5.6.1+ + ./patches/meshboolean-const.patch + ./patches/dont-link-opencv-world-orca.patch + ]; preFixup = '' gappsWrapperArgs+=( diff --git a/pkgs/applications/misc/bambu-studio/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch b/pkgs/applications/misc/bambu-studio/patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch similarity index 100% rename from pkgs/applications/misc/bambu-studio/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch rename to pkgs/applications/misc/bambu-studio/patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch diff --git a/pkgs/applications/misc/bambu-studio/0002-fix-build-for-gcc-13.diff b/pkgs/applications/misc/bambu-studio/patches/0002-fix-build-for-gcc-13.diff similarity index 100% rename from pkgs/applications/misc/bambu-studio/0002-fix-build-for-gcc-13.diff rename to pkgs/applications/misc/bambu-studio/patches/0002-fix-build-for-gcc-13.diff diff --git a/pkgs/applications/misc/bambu-studio/patches/dont-link-opencv-world-bambu.patch b/pkgs/applications/misc/bambu-studio/patches/dont-link-opencv-world-bambu.patch new file mode 100644 index 000000000000..cb7e212144ac --- /dev/null +++ b/pkgs/applications/misc/bambu-studio/patches/dont-link-opencv-world-bambu.patch @@ -0,0 +1,14 @@ +diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt +index 2cdc525..44e6602 100644 +--- a/src/libslic3r/CMakeLists.txt ++++ b/src/libslic3r/CMakeLists.txt +@@ -533,7 +533,8 @@ target_link_libraries(libslic3r + ${OCCT_LIBS} + Clipper2 + mcut +- opencv_world ++ opencv_core ++ opencv_imgproc + ) + + if(NOT WIN32) \ No newline at end of file diff --git a/pkgs/applications/misc/bambu-studio/dont-link-opencv-world.patch b/pkgs/applications/misc/bambu-studio/patches/dont-link-opencv-world-orca.patch similarity index 100% rename from pkgs/applications/misc/bambu-studio/dont-link-opencv-world.patch rename to pkgs/applications/misc/bambu-studio/patches/dont-link-opencv-world-orca.patch diff --git a/pkgs/applications/misc/bambu-studio/meshboolean-const.patch b/pkgs/applications/misc/bambu-studio/patches/meshboolean-const.patch similarity index 100% rename from pkgs/applications/misc/bambu-studio/meshboolean-const.patch rename to pkgs/applications/misc/bambu-studio/patches/meshboolean-const.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 309a7355af15..6c0b5ec0d532 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32342,15 +32342,7 @@ with pkgs; super-slicer-latest = super-slicer.latest; - bambu-studio = callPackage ../applications/misc/bambu-studio { - inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good; - - wxGTK31 = wxGTK31.override { - withCurl = true; - withPrivateFonts = true; - withWebKit = true; - }; - }; + bambu-studio = callPackage ../applications/misc/bambu-studio { }; orca-slicer = callPackage ../applications/misc/bambu-studio/orca-slicer.nix {};