@@ -107,6 +107,7 @@
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages stb)
#:use-module (gnu packages swig)
#:use-module (gnu packages tbb)
#:use-module (gnu packages tcl)
@@ -2872,3 +2873,48 @@ messages based on the Protocol Buffers library. It is designed to
facilitate the communication between Cura and its backend and similar code.")
(license license:lgpl3))))
+(define-public cura-engine
+ (package
+ (name "cura-engine")
+ (version "4.7.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Ultimaker/CuraEngine")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "177fk6j4gn3ssi8j1qxj8p4486f7jkz328vc75agxnh7vhd4mwsm"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("googletest" ,googletest)))
+ (inputs
+ `(("protobuf" ,protobuf)
+ ("libArcus" ,libArcus)
+ ("stb-image" ,stb-image)))
+ (arguments
+ `(#:configure-flags '("-DBUILD_TESTS=ON")
+ #:phases (modify-phases %standard-phases
+ (add-before 'configure 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "../source/cmake/FindStb.cmake"
+ (("/usr/include")
+ (string-append (assoc-ref inputs "stb-image")
+ "/include"))
+ (("stb/stb_image_resize.h")
+ "stb_image.h"))
+ (substitute*
+ "../source/src/infill/ImageBasedDensityProvider.cpp"
+ (("stb/stb_image.h")
+ "stb_image.h"))
+ #true)))))
+ (home-page "https://github.com/Ultimaker/CuraEngine")
+ (synopsis "Cura slicing engine")
+ (description "CuraEngine is a powerful, fast and robust engine for
+processing 3D models into 3D printing instruction for Ultimaker and other
+GCode based 3D printers. It is part of the larger open source project called
+Cura.")
+ (license license:agpl3)))
+