From: Ivan Gankevich <i.gankevich@spbu.ru>
To: 49713@debbugs.gnu.org
Cc: Ivan Gankevich <i.gankevich@spbu.ru>
Subject: [bug#49713] [PATCH 3/3 v2] gnu: Add prusa-slicer.
Date: Mon, 20 Sep 2021 00:38:40 +0300 [thread overview]
Message-ID: <20210919213838.2343-1-i.gankevich@spbu.ru> (raw)
In-Reply-To: <20210723210037.28150-1-i.gankevich@spbu.ru>
* gnu/packages/engineering.scm (prusa-slicer): New variable.
---
gnu/packages/engineering.scm | 83 ++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 2c22cc3278..3f7d087269 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -24,6 +24,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,6 +96,7 @@
#:use-module (gnu packages image-processing)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libevent)
+ #:use-module (gnu packages libusb)
#:use-module (gnu packages linux) ;FIXME: for pcb
#:use-module (gnu packages lisp)
#:use-module (gnu packages m4)
@@ -2951,3 +2953,84 @@ a process.")
(description "This library provides functionality for shape modelling,
visualization, matrix manipulation.")
(license (list license:gpl3 license:mpl2.0))))
+
+(define-public prusa-slicer
+ (package
+ (name "prusa-slicer")
+ (version "2.3.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/prusa3d/PrusaSlicer")
+ (commit (string-append "version_" version))))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "0w0synqi3iz9aigsgv6x1c6sg123fasbx19h4w3ic1l48r8qmpwm"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove bundled libraries that were not modified by Prusa Slicer developers.
+ (delete-file-recursively "src/hidapi")
+ (delete-file-recursively "src/eigen")
+ (delete-file-recursively "src/libigl/igl")))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ '("-DSLIC3R_FHS=1" ;; Use The Filesystem Hierarchy Standard.
+ "-DSLIC3R_GTK=3" ;; Use GTK+
+ "-DSLIC3R_WX_STABLE=1") ;; Use wxWidgets 3.0.x.x to prevent GUI crashes.
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'unbundle-3d-party-libraries
+ ;; Prusa slicer bundles a lot of dependencies in src/ directory.
+ ;; Most of them contain prusa-specific modifications (e.g. avrdude),
+ ;; but others do not. Here we replace the latter with Guix packages.
+ (lambda _
+ (substitute* "src/CMakeLists.txt"
+ (("add_subdirectory\\(libigl\\)" all)
+ (string-append
+ all "\ninclude_directories(libigl INTERFACE libigl::core)"))
+ (("add_subdirectory\\(hidapi\\)")
+ "pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
+ (("include_directories\\(hidapi/include\\)")
+ "include_directories()"))
+ ;; Do not link with bundled hidapi library.
+ (substitute* "src/slic3r/CMakeLists.txt"
+ (("add_library\\(libslic3r_gui.*" all)
+ (string-append
+ all
+ "\ntarget_include_directories(libslic3r_gui PUBLIC ${HIDAPI_INCLUDE_DIRS})\n"))
+ (("\\bhidapi\\b") "${HIDAPI_LIBRARIES}")))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("boost" ,boost)
+ ("cereal" ,cereal)
+ ("cgal" ,cgal)
+ ("curl" ,curl)
+ ("dbus" ,dbus)
+ ("eigen" ,eigen)
+ ("expat" ,expat)
+ ("glew" ,glew)
+ ("glib" ,glib)
+ ("gmp" ,gmp)
+ ("gtk" ,gtk+)
+ ("hidapi" ,hidapi)
+ ("ilmbase" ,ilmbase)
+ ("libigl" ,libigl)
+ ("libpng" ,libpng)
+ ("mesa" ,mesa)
+ ("mpfr" ,mpfr)
+ ("nlopt" ,nlopt)
+ ("openvdb" ,openvdb)
+ ("pango" ,pango)
+ ("tbb" ,tbb)
+ ("udev" ,eudev)
+ ("wxwidgets" ,wxwidgets)
+ ("zlib" ,zlib)))
+ (home-page "https://www.prusa3d.com/prusaslicer/")
+ (synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
+ (description "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into
+G-code instructions for FFF printers or PNG layers for mSLA 3D printers.")
+ (license license:agpl3)))
--
2.32.0
next prev parent reply other threads:[~2021-09-19 21:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 21:00 [bug#49713] [PATCH 1/3] gnu: cereal: Use cmake to build and install the library Ivan Gankevich
2021-07-23 21:07 ` [bug#49713] [PATCH 2/3] gnu: Add libigl Ivan Gankevich
2021-09-18 17:17 ` Liliana Marie Prikler
2021-09-19 20:18 ` Ivan Gankevich
2021-07-23 21:08 ` [bug#49713] [PATCH 3/3] gnu: Add prusa-slicer Ivan Gankevich
2021-09-18 17:26 ` Liliana Marie Prikler
2021-09-19 21:39 ` Ivan Gankevich
2021-09-19 21:53 ` Liliana Marie Prikler
2021-09-20 22:17 ` Ivan Gankevich
2021-09-21 12:12 ` bug#49713: " Liliana Marie Prikler
2021-09-18 15:53 ` [bug#49713] Patches work, how to upstream them phodina via Guix-patches via
2021-09-18 17:13 ` [bug#49713] [PATCH 1/3] gnu: cereal: Use cmake to build and install the library Liliana Marie Prikler
2021-09-19 18:27 ` Ivan Gankevich
2021-09-19 18:26 ` [bug#49713] [PATCH 1/3 v2] " Ivan Gankevich
2021-09-19 20:18 ` [bug#49713] [PATCH 2/3 v2] gnu: Add libigl Ivan Gankevich
2021-09-19 21:38 ` Ivan Gankevich [this message]
2021-09-20 22:15 ` [bug#49713] [PATCH v3 1/3] gnu: cereal: Use cmake to build and install the library Ivan Gankevich
2021-09-20 22:15 ` [bug#49713] [PATCH v3 2/3] gnu: Add libigl Ivan Gankevich
2021-09-20 22:15 ` [bug#49713] [PATCH v3 3/3] gnu: Add prusa-slicer Ivan Gankevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210919213838.2343-1-i.gankevich@spbu.ru \
--to=i.gankevich@spbu.ru \
--cc=49713@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.