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 iDctNrz0GGGEegEAgWs5BA (envelope-from ) for ; Sun, 15 Aug 2021 13:04:28 +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 uEQDMrz0GGE0KwAAB5/wlQ (envelope-from ) for ; Sun, 15 Aug 2021 11:04:28 +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 7AB696FA for ; Sun, 15 Aug 2021 13:04:28 +0200 (CEST) Received: from localhost ([::1]:54868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFDwJ-0006QF-HI for larch@yhetil.org; Sun, 15 Aug 2021 07:04:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFDvw-0006Pj-3m for guix-patches@gnu.org; Sun, 15 Aug 2021 07:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFDvu-0000PU-LM for guix-patches@gnu.org; Sun, 15 Aug 2021 07:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFDvu-0002hN-By for guix-patches@gnu.org; Sun, 15 Aug 2021 07:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50052] [PATCH] Add prusa-slicer Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 Aug 2021 11:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50052 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Daniel Trujillo Viedma , 50052@debbugs.gnu.org Received: via spool by 50052-submit@debbugs.gnu.org id=B50052.162902538910294 (code B ref 50052); Sun, 15 Aug 2021 11:04:02 +0000 Received: (at 50052) by debbugs.gnu.org; 15 Aug 2021 11:03:09 +0000 Received: from localhost ([127.0.0.1]:45856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFDuy-0002ft-Bj for submit@debbugs.gnu.org; Sun, 15 Aug 2021 07:03:09 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:43644 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFDus-0002fF-7c for 50052@debbugs.gnu.org; Sun, 15 Aug 2021 07:03:03 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1629025368; bh=6DINk8Ek9SH/xh0t4PxIzLidQgkzbUq3oCPgAcT/Y2U=; h=From:To:Subject:In-Reply-To:References:Date; b=q7esBtxSp0tOx1nKkNDFaN3NLoP/hyvrSQjrOVtMhDoshXk0KvE95pvPx9gawtPMo txhF6B4L+G28iZMSEhpDbViw2xf8Ap1j4WCqwFeourYqq0HCqNvub40eHDimIeRe3m rrf7mxxv1mTtF3t+AT54MJsqZywumeKptybDVkeE= In-Reply-To: References: <0654f9e7-8c1d-aa4c-3240-54faf3defb2f@gmail.com> Date: Sun, 15 Aug 2021 13:02:39 +0200 Message-ID: <878s139dio.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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=1629025468; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=eKWMZYXbv8EZZMSwJU7lunATjw1HBDuCyfWUfkyKAgA=; b=q6bM09/Uv0DrYJ255/Kgvp+/9oRT0mqdMnnG66i6dJ3wOENI9vxydel0jALSYNKcrLroM5 cDiz7ME/RcdPtZ4MaT/n+JclLpmmAw28P5EoFSegP5gQ6EdYvgLLQ5fMdt1DVh0QE7IpKd cJfetZWRrvfiInI6PG585JmPf6uiINUI9LwLtBMsb2cAauMWd2gAi0yKYdoAav7PXVAfbP rBIU06BRJg5BiyV3xj0lzeFw3t5k233Y+IIV7JWowXaOxuCvsWwZ9WRHOk56T4uCHkNM9a 4dHDfU5nW4ewoDdm3JQQWUQj9DMnl9Gr8gn5xJixlYBopLWEYvxxvGA9m0B0lA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629025468; a=rsa-sha256; cv=none; b=TYTr9L4yTh39P90Z7EmEhgZvDZM9UUIlWcINdy3yJ44BXME6vg0MA+CMCRA80tf5ks4QQi Z5M/N6EyU+5S/z4ovfz7YJGPR+pYAGsBeiVHm4+lxHP9uWQhxnr1yZG1QhQNuKSlJcOLRZ FnVZnevKJEO2PCiIBB+oNlo/IiusPu6goSCFWMtndqV/tyE6GVQ5Z9LOQ1lMjFD1NJ5rCz JihAwFxQjLHGHvA5Tm1GjhpRTHx3ij3d9aDkldppKVJ9pFstuo6HdAZGx+6ti8eh8EmrUd dJlDbQsVsXu3tSzzGOjXx1CtCuncxmY2iEFobIRcP4uZUI4vFJ182T2hcO+khQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=q7esBtxS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=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: -3.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=q7esBtxS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=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: 7AB696FA X-Spam-Score: -3.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: +2JqLj0hO+BI --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, Aug 14 2021, Daniel Trujillo Viedma wrote: > Hi! I'm Daniel Trujillo, > > > This is my first-time-ever contribution to GNU Guix, so please, don't=20 > hold any nitpick to yourself!! :) > > > I don't know if these kind of packages are of interest, but this is=20 > PrusaSlicer [0], a software to prepare 3D printings (hence I put it in=20 > engineering.scm). > > The packaged version, 2.3.3 is the latest stable available at this=20 > moment. But this version has as important problem [1]: It cannot be=20 > invoked just naming the executable (through $PATH), because then, it=20 > can't locate the resources directory. I learned **the hard way** that=20 > the fix was applied *after* the release of the 2.3.3 version, so I=20 > decided to backport the fix adding a patch because it's a show-stopper=20 > to have to type the path to the executable in /gnu/store/... That's the=20 > reason why the patch attached to this email contains, not only the=20 > additions to engineering.scm, but also a patch that implements the=20 > solution in the version 2.3.3 codebase (It's quite simple, it uses a=20 > boost function to determine the path to the executable rather than=20 > relying on argv[0]). > > > Known improvable things: > * It's configured to use GTK3. After many attempts to compile it under=20 > GTK2 in a guix environment, sometimes it detected GTK right away, and=20 > some ether times I had to add more includes. It wasn't quite reliable=20 > and, according to the convention followed in gtk+ packages, probably it=20 > would be better that prusa-slicer uses GTK3, and a hypothetical future=20 > GTK2 version would be called prusa-slicer-gtk2. > > * In order for the above $PATH issue fix to work, it's crucial that the=20 > cmake variable SLIC3R_FHS is set to off. This is the default value=20 > according to the CMakeLists.txt, but because it's so important, probably= =20 > it should have been included in the configure-flags argument? Just for=20 > clarity. That=E2=80=99s probably a good idea, in case upstream changes the default v= alue in the future. > * Currently, the version displayed in the title bar is=20 > "....2.3.3+UNKNOWN". This is because of another cmake option not set. It= =20 > doesn't have any influence in the software, as far as I know, but it's=20 > arguably ugly. The version I currently use, doesn't display that in the=20 > title bar, but it does in the "About" window, and it says=20 > ".....2.3.3+linux-64". Maybe something like "GNU Guix" would be=20 > prettier. But if I have to include the arch, I would have to dig deeper=20 > into package definitions ^_^''' > > > I hope everything is in order, I'm looking forward to see your comments,= =20 > and hope I can start contributing more packages to Guix!! > > > Cheers, > > Dani. > > > [0] https://www.prusa3d.es/prusaslicer/ > > [1] https://github.com/prusa3d/PrusaSlicer/issues/5542 > > > From 522c1904cf62afac25a9d974091211adac760c25 Mon Sep 17 00:00:00 2001 > From: Daniel Trujillo Viedma > Date: Sat, 14 Aug 2021 00:00:55 +0200 > Subject: [PATCH] Add prusa-slicer > > --- The commit message should be in the GNU ChangeLog format, see the commit log for examples, or check the manual. =20=20 > gnu/packages/engineering.scm | 58 ++++++++++++++++= ++++++ > .../patches/prusa-slicer-backport-fix-5542.patch | 31 ++++++++++++ This patch should also be added to the gnu/local.mk file. > 2 files changed, 89 insertions(+) > create mode 100644 gnu/packages/patches/prusa-slicer-backport-fix-5542.p= atch > > diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm > index 33c124a2ea..047d99c0af 100644 > --- a/gnu/packages/engineering.scm > +++ b/gnu/packages/engineering.scm > @@ -2863,3 +2863,61 @@ for hooking Linux system calls in user space. Thi= s is achieved by > hot-patching the machine code of the standard C library in the memory of > a process.") > (license license:bsd-2)))) > + > +(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)))) The =E2=80=98file-name=E2=80=99 field should be set to (file-name (git-file-name name version)) to give the git checkout, in the Guix store, a more descriptive name, otherwise its name is /gnu/store/hc1slayzjz8xrw24q8wzgcs6xrzfk74q-git-checkout which doesn=E2=80=99t really say much. This usually only applies if some k= ind of VCS repository is used, and not if =E2=80=98url-fetch=E2=80=99 is used. > + (sha256 > + (base32 "0w0synqi3iz9aigsgv6x1c6sg123fasbx19h4w3ic1l48r8qmpwm")) > + (patches (search-patches "prusa-slicer-backport-fix-5542.patch")))) > + (build-system cmake-build-system) > + (arguments > + `(#:configure-flags `("-DSLIC3R_GTK=3D3"))) > + (native-inputs > + `(("pkg-config" ,pkg-config))) > + (inputs > + `(("perl" ,perl) > + ("glibc-locales" ,glibc-locales) > + ("adwaita-icon-theme" ,adwaita-icon-theme) > + ("boost" ,boost) > + ("tbb" ,tbb) > + ("curl" ,curl) > + ("zlib" ,zlib) > + ("eigen" ,eigen) > + ("expat" ,expat) > + ("libpng" ,libpng) > + ("mesa" ,mesa) > + ("glew" ,glew) > + ("cereal" ,cereal) > + ("nlopt" ,nlopt) > + ("openvdb" ,openvdb) > + ("cgal" ,cgal) > + ("gmp" ,gmp) > + ("mpfr" ,mpfr) > + ("qhull" ,qhull) > + ("wxwidgets" ,wxwidgets-3.1) > + ("coreutils" ,coreutils) > + ("grep" ,grep) > + ("sed" ,sed) > + ("glibc" ,glibc) These packages are already included in the =E2=80=98cmake-build-system=E2= =80=99 by default, no need to add them explicitly. > + ("gtk+" ,gtk+) > + ("pango" ,pango) > + ("dbus" ,dbus))) > + (home-page "https://www.prusa3d.com/prusaslicer/") > + (synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultim= aker etc.)") > + (description > + "PrusaSlicer (formerly known as Slic3r Prusa Edition or Slic3r PE) = is > +our own in-house developed slicer software based on the open-source proj= ect > +Slic3r. PrusaSlicer is an open-source, feature-rich, frequently updated > +tool that contains everything you need to export the perfect print files Nit: =E2=80=9Cperfect=E2=80=9D sounds a bit too much like marketing speak; = instead of =E2=80=9Cto export the perfect print files=E2=80=9D, I suggest =E2=80=9Cto = export to print files=E2=80=9D. WDYT? > +for your Original Prusa 3D printer.") > + (license license:agpl3))) According the the LICENSE file, this should be agpl3+ (grep for =E2=80=9Cany later version=E2=80=9D). I didn=E2=80=99t manage to build the package because my machine ran out of memory, but I assume that it built fine for you. :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEY9E8VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5tBAQALX7j4VFDC+kkWNwy8bSJwLN8lgn VCcHK6Y8uFmI0fMPNG8tKi0mzzc8Grpkn6nmByUM1CAFbZPrQa5MmzuT3wxG25+g zhZ0YGkDsB+wUk2Px9k1pD7GEEcNQBlRDvgpJP8mR62cH/LfZGKAzHv8rhk5c8Bs ymb+DX4VSCFPZsNQPNDIq+1fE2MXT+PZ9YBJBgmKoJ//BO3YF7DefoW1qaCFUOEE LtdyWkpXVSCkOFRbSuOlEEubkzgAtk+Q9Ey3qMh5dMF1eTV9vAXQOGmipiHySWiG TSaQkvSr4JaRJFlqNV8d+HDdHTZc+05/sPVU3TpiZFxDXOZKU+Ge+zvkK/Xvr6+g XX1/AdNKSSFrK/93eXTcXCgk9NAWELsrRHyatv4NU3iUQaG1Gd0arsgKKPEarRNn x4/85O/85jTBb5Z1eH2oEB2v3EfYeCXiHnVrNFjdtZsV9XgcwVAhmqI2qjnEAVh3 NuDWNu5YvzZb7NOkmccmDDngWb71dx+iImR3RoUHovoifWor3Pj2KPCmdYkmbEIW N4H/XJbhHzETZZqZwq8OoTz23Pzl+KVWaB7z2NPrIUAs17J3jF7BcJa6Pet9n6d3 y817Yjfcd7oXZHmg2GoWwOUrigLCDMHCbPbd7785ebJcPUHEMfXMvXCtq8ySzai6 rhsvECaXlbW1Rhll =odR0 -----END PGP SIGNATURE----- --=-=-=--