From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kIZaOT+uR2FLfQAAgWs5BA (envelope-from ) for ; Sun, 19 Sep 2021 23:40:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qO34ND+uR2ENbAAAB5/wlQ (envelope-from ) for ; Sun, 19 Sep 2021 21:40:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5201215E78 for ; Sun, 19 Sep 2021 23:40:15 +0200 (CEST) Received: from localhost ([::1]:55800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mS4Xm-0003Bw-Fj for larch@yhetil.org; Sun, 19 Sep 2021 17:40:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mS4Xa-0003BM-Aj for guix-patches@gnu.org; Sun, 19 Sep 2021 17:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mS4Xa-0004Je-2v for guix-patches@gnu.org; Sun, 19 Sep 2021 17:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mS4XZ-0002N2-Oe for guix-patches@gnu.org; Sun, 19 Sep 2021 17:40:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49713] [PATCH 3/3 v2] gnu: Add prusa-slicer. References: <20210723210037.28150-1-i.gankevich@spbu.ru> In-Reply-To: <20210723210037.28150-1-i.gankevich@spbu.ru> Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Sep 2021 21:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49713 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49713@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49713-submit@debbugs.gnu.org id=B49713.16320875839075 (code B ref 49713); Sun, 19 Sep 2021 21:40:01 +0000 Received: (at 49713) by debbugs.gnu.org; 19 Sep 2021 21:39:43 +0000 Received: from localhost ([127.0.0.1]:40161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS4XG-0002ME-JP for submit@debbugs.gnu.org; Sun, 19 Sep 2021 17:39:43 -0400 Received: from mail.spbu.ru ([195.70.197.23]:35692 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS4XD-0002Lx-7q for 49713@debbugs.gnu.org; Sun, 19 Sep 2021 17:39:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=oUBSh4FMzC6GFm+BlEbWEKyAWPSEHdkaURXevaIIYfw=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject :Cc:To:From; b=r4+ODasrZcGEo6Zllr8TEAq/adlC0y4DiQkt94EbGiL1RDS/EkqHuFNUyXJjmv 3MTN5QrbIZF4O/ZqrAhIBNmmxfArzXGHNuPXIn+ACAYyrS75w73BmXqBire4xPQWtjP3Fls9l2kO+ Y9wul4U5gKsuDcoZddc3I1k1V4LuTYPSnvGyQTDbRat7RrLA38GzL/+n9ZFoCPWHIoas7MS33h45y +Ouxi+nOm7RFrr6UnA5wKdXu0ulAAfWmlQn9t0X+Tkwn4Vr5h836XXSU8km1LW9LKPx4mbxi80MBy Z6LJqjfL6/Fo2bOXE0VxgTGpUTnw1YliXVDWYZHbm/F7HT42g== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 186751375; Mon, 20 Sep 2021 00:39:31 +0300 From: Ivan Gankevich Date: Mon, 20 Sep 2021 00:38:40 +0300 Message-Id: <20210919213838.2343-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632087615; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yOAmDxCXwJnWDj+KcOCE9WTgUWCT/V1Nc3LZX0X+KG4=; b=X8mGfX+nnu/UTjZsRctnlapWiMCOhWSU3SVPVsyhDiAZSpERyKQIF4wX7jibM7v3Y5L/p9 m/FZHdm2mKUKCKxNFZ6swiAIGGkEgCuj+PFeozgbCCWjzJRKUXzCWYo2NOBo4wYKf7kqUF 5g34+ltcsDE7DgBWneRvAWHSExG+1zbZULfnFwBagogkm/0IhOwx+kIXfllIVGUuDHbhl8 jRm2JOQbHDpzA8QUiHyRVzdcAFBq2kMhg07uv2Mz1/bvIPlkO1GJQOZL5E63zgGmsd6v2k rP2C/Zf6blqDOTcGgbgbTDSxslLRTsF3XPV322P2BKeCyjfR0upCCqRbulmHMw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632087615; a=rsa-sha256; cv=none; b=q/sEqpnS5d+p8KV6s9D+1Ga9Zw+JzCQKYCZhY5ow5cQ3r4ccEKSNA10JtCQbIVkE+8uAk5 jrzQHcJWgg6I6g97zm1ahlwKeL1oBoo53/I7sv7v4rkz+sTGRrzkiaKRqMV0r+kXYWG9Qm 4NhAMEvZmSsEh+RS+icilnv+ISm6zr/Mn3N8wTSmeGooyX6OYR96dCLkzcVO+TE1BpqZPX u9lYAR5UoxiXvsbWYatR3KNw22tTHUOZIZ+8jXzCyNVmjxk3poLUUxHJCyoIbjwuH1GG/3 21Z1i1u4zTbCkFyefAAq2n3fcvU0w0aSXWGhIMbw6VgrkJOW89LznS+oTW67sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=r4+ODasr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.39 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=r4+ODasr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5201215E78 X-Spam-Score: -0.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: G13c5yzdkmj+ * 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 ;;; Copyright © 2021 Gerd Heber ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2021 Ivan Gankevich ;;; ;;; 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