From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qFgtGGMMSWFgJgAAgWs5BA (envelope-from ) for ; Tue, 21 Sep 2021 00:34:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KJbdE2MMSWF8fAAA1q6Kng (envelope-from ) for ; Mon, 20 Sep 2021 22:34:11 +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 C86591131D for ; Tue, 21 Sep 2021 00:34:10 +0200 (CEST) Received: from localhost ([::1]:40004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSRrV-0007pB-Q0 for larch@yhetil.org; Mon, 20 Sep 2021 18:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSRax-0006zy-57 for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSRaw-0007al-SD for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSRaw-0000Pg-OF for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49713] [PATCH v3 3/3] gnu: Add prusa-slicer. Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Sep 2021 22:17:02 +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.16321762071543 (code B ref 49713); Mon, 20 Sep 2021 22:17:02 +0000 Received: (at 49713) by debbugs.gnu.org; 20 Sep 2021 22:16:47 +0000 Received: from localhost ([127.0.0.1]:44217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRah-0000Oo-36 for submit@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:47 -0400 Received: from mail.spbu.ru ([195.70.197.23]:45067 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRae-0000OW-O0 for 49713@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=wZyZepfSVGN3/EMic1ljSdCJCGrfdIEGvk22vbYn/gw=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From; b=G0dRRQlBjsoYFRGiC3EtbJnc8lfSNm371rd8Y9h be07gvtxcv7P2SKzHVY6+6csUegZTN2LH0W16Wh3HQudkoBLE82E2nZZEfRQmhAlkR18n8kDKKB4O 6KHUuPsYqknXl70c7QJRnZbZ+9EsbVNTFnFAPRDE6P4I1jJA2SmTtCR54xajQ+TziTwhgkVUhfy+W t903rQ7zeaS5BI/YYCs1QL8axk+uaP7TqcWj4SKWNLpOs2tIzmPW3uEpCsW5MrVE5DLsfnCQN1yQ5 JUepZAZkE0wL0ntNf4RaCCecBuLZcGz8h2o1VM1Z6NKVkGEXTgO7kaYfP8Sa8GNZXwiYqtUg== 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 187015493; Tue, 21 Sep 2021 01:16:38 +0300 From: Ivan Gankevich Date: Tue, 21 Sep 2021 01:15:52 +0300 Message-Id: <20210920221549.14678-3-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210920221549.14678-1-i.gankevich@spbu.ru> References: <20210920221549.14678-1-i.gankevich@spbu.ru> 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=1632177250; 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=/u4kTVPrQoPzEFzMmeEj+SD9BIvpSGIjpuBZ7X1MBpk=; b=b6Sh5Gq1VOlRPbVs+z0dL23FSaaGuOy0wAgvzUUBhg5M296+kgTQC+hMlkfrAf+lAC4fn0 qaYjW5KbydHuVFtJ9uQNCC54XiEyg6848sQBP2q+HvMrKxo3IRpM0SD24iamkGrxxI2dOF qbBWdT9StKgQAjMrMzETLLqVsnHOmd53xMNxMuUSv6IDbiDXNuMavhn/MEhZgWlyRn2xjO xzk9gHNimGzNwCUK06o1cWxiq/XBoH08E76lfzTL8F0MOeRf175Z0atmCkG41Ho3JKO1Ng mEEZXxMXNUJKOwKCYRbisS4f9e7HLOFpHm2GmPZnZb1D74k71lqiEn0eU8y+sQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632177250; a=rsa-sha256; cv=none; b=k23t1BunowqJEMA19OF22QDyZUtqrX0WO4OKhg8XQj5/NHxbzylXJFATLxImLp7F3RusY6 uCTpJjvZLN3iuUYtSEhqos3qUFZINkvb8V/m5s/ZTQ4m4XnZ3STrLQKxtBkJmXq0I3SDfo NFWhMsK2CVm2jGWfGK8I3FZndMRUCWTnpnxtX9Q775TQl2cs/ZmNkeo0IOtexkNHOmIOBE be30TbJUF/UM0ZcnhK3DuB8EyRTrq6WblY/FPBaP7vk/2XougNIxv+kYsXR91B9SGeR8nQ UJZYcmIDBdEEN+ywhp35QFeWOQSvmvC5cZ4e7PEqWDADpEQ0YlYHBZwm5uHxig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=G0dRRQlB; 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=G0dRRQlB; 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: C86591131D X-Spam-Score: -0.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: Avj/rYwBnmDE * gnu/packages/engineering.scm (prusa-slicer): New variable. --- gnu/packages/engineering.scm | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 421a10292a..c4183c0c71 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) @@ -3002,3 +3004,80 @@ 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 + ;; 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. + ;; 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") + (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()")) + (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}")))))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + '("-DSLIC3R_FHS=1" ;; Use The Filesystem Hierarchy Standard. + "-DSLIC3R_GTK=3" ;; Use GTK+ + ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers. + "-DSLIC3R_WX_STABLE=1"))) + (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