From patchwork Mon Jul 11 18:39:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 3688 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EFBEE27BBEA; Mon, 11 Jul 2022 19:41:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 53C3427BBE9 for ; Mon, 11 Jul 2022 19:41:25 +0100 (BST) Received: from localhost ([::1]:52396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAyLT-0006kZ-Qb for patchwork@mira.cbaines.net; Mon, 11 Jul 2022 14:41:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAyKA-0006Gg-LQ for guix-patches@gnu.org; Mon, 11 Jul 2022 14:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAyKA-00012d-CC for guix-patches@gnu.org; Mon, 11 Jul 2022 14:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAyKA-0005C4-9J for guix-patches@gnu.org; Mon, 11 Jul 2022 14:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56354] [PATCH] gnu: engineering: Add candle. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Jul 2022 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56354 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jean Pierre De Jesus DIAZ Cc: "56354@debbugs.gnu.org" <56354@debbugs.gnu.org> Received: via spool by 56354-submit@debbugs.gnu.org id=B56354.165756476419907 (code B ref 56354); Mon, 11 Jul 2022 18:40:02 +0000 Received: (at 56354) by debbugs.gnu.org; 11 Jul 2022 18:39:24 +0000 Received: from localhost ([127.0.0.1]:40992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAyJY-0005Az-8H for submit@debbugs.gnu.org; Mon, 11 Jul 2022 14:39:24 -0400 Received: from mail-lj1-f177.google.com ([209.85.208.177]:44938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAyJT-0005Ah-O2 for 56354@debbugs.gnu.org; Mon, 11 Jul 2022 14:39:23 -0400 Received: by mail-lj1-f177.google.com with SMTP id a39so7240523ljq.11 for <56354@debbugs.gnu.org>; Mon, 11 Jul 2022 11:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oArJq+7fm40tNjYFwxUfnM04xeo8JNSYcJa4etoLD7o=; b=pm/4Cbhc6II7KRGr7XmSUM3ERPSYK38qB8XC62xZXwAHoYnL3UuAen6JiITNwfRahb uAs0HV5hxUcnYEM8Uqkdf6lPh0yS9O1PaIZKI+7MlPAh5a/iJJeBtRod/JLQFTz9JY9E pCzsA+e/12U4ag/nowaYQH8nerwgAfYqWh7dRpHgqXela8klCkPl1d/KJcyfKDLNJJOb FXym1Dg0dEwIYq1AeA9oL4hqcySeunUKnvSZdGm145AWwxIGkxOrmu0LU0YCCjnJvAkj lAi8jhpoCbOembJvGjC+WN9IQ4c2kGBoCwkRw4z0+26QJBbVrCle1BHIsCu8ySyrzyFm Ty/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=oArJq+7fm40tNjYFwxUfnM04xeo8JNSYcJa4etoLD7o=; b=6PDik59WHRkrAKxrgwrfmfIjt/lkYk8yns55WHI/6/d4A+XjXSiHa9l8FlFzvNfK0+ VbxUHH3z8CE4a5/Apq8SsqcLPRpG3jh27/w3l/IzsDgOrl7wD30IdtUBJZPzKb/XADox bm8LaG4yL1bQF3s/KM8sE6DQr36x1d4yX+RT3/EVI5q+b1z3uie6hracyu7CJyu0OxXW V8fP9ztyZoWL/xx3VxfAZtFHx3UpEPrrG7P6NFBxqBJHedzZNpycnOGIAcVXxrxQ03wS JTLSbXEdxD6d9MtLVXp1dFxQuX+A8e5Q93pZGd0so1Eka0uHAUkvub7dGUrsnK1qo1XE ItDQ== X-Gm-Message-State: AJIora+geZuamIdZJIk8u6TUKTDiWcJjVpkXvJ8bREssrsHJC8IY6OlT zH9lvoxUwDs1oocIAYlGMSWuyTi1NCD94Q== X-Google-Smtp-Source: AGRyM1sNnaKEtOa2xyGK48oJmt7gxIRJtddChz7a9IkEzh7yJF6OKFDOmN55i7LP6SYbZqW1evXDSA== X-Received: by 2002:a2e:a588:0:b0:25b:cb8a:9137 with SMTP id m8-20020a2ea588000000b0025bcb8a9137mr11281217ljp.237.1657564753261; Mon, 11 Jul 2022 11:39:13 -0700 (PDT) Received: from elephant ([5.164.222.47]) by smtp.gmail.com with ESMTPSA id c19-20020ac25f73000000b004862d59d35fsm1667114lfc.154.2022.07.11.11.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 11:39:12 -0700 (PDT) From: "Artyom V. Poptsov" References: Date: Mon, 11 Jul 2022 21:39:03 +0300 In-Reply-To: (Jean Pierre De Jesus DIAZ's message of "Mon, 11 Jul 2022 11:55:52 +0000") Message-ID: <87a69fsddk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello Jean Pierre De Jesus DIAZ. > The `out' variable is not used, so the let can be safely removed and the lambda > simplified, also instead of `chdir', `with-directory-excursion' could be used, > but's a matter of preference (don't know if one or other style is preferred > inside GNU Guix). Done. > The `out' binding can be also replaced by `#$output', e.g.: Done. I also tried to use 'with-directory-excursion' instead of 'chdir' but Candle build fails with it, so I kept 'chdir' version. > Other than that the package definition looks good to me, and did a quick pass > over the Candle source code to check that it doesn't contain any malware. > Only a bundled font is present (src/fonts/Ubuntu-Regular.tff), but that one is > not provided by GNU Guix (don't know the specific reasons, but got added then > removed) so no need to replace it with provided ones. Thanks again for the patch review! Here's my updated patch. - Artyom From 7aac50730febeb95d0f7a4ab1cbb6e7dfb632553 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Thu, 23 Jun 2022 23:02:40 +0300 Subject: [PATCH] gnu: engineering: Add candle. * gnu/packages/engineering.scm (candle): New variable. --- gnu/packages/engineering.scm | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index fe8ab13298..e1297c0f85 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3688,3 +3688,64 @@ (define-public xschem netlists from the drawn schematic, allowing the simulation of the circuit.") (home-page "https://xschem.sourceforge.io/stefan/index.html") (license license:gpl2+)))) + +(define-public candle + ;; The latest tagged version 1.2b fails on the build stage due to + ;; non-supported g++ flags so we need to use the latest commit from the + ;; 'master' branch in the repository. + (let ((commit "3f763bcde1195e23ba119a5b3c70d7c889881019") + (revision "1")) + (package + (name "candle") + (version (git-version "1.2b" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Denvi/Candle") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08rqhl6a5a8s67a8yl16944zgcsnnb08xfv4klzyqwlvaqgfp783")))) + (build-system gnu-build-system) + (native-inputs (list qttools)) + (inputs (list qtbase-5 qtserialport)) + (arguments + (list #:tests? #f ; no tests. + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-sources + (lambda _ + (substitute* (find-files "." ".*\\.h") + (("const char\\* what\\(\\) const override") + "const char* what() const noexcept override")))) + (add-after 'unpack 'fix-application-settings-path + (lambda _ + (substitute* "src/frmmain.cpp" + (("qApp->applicationDirPath\\(\\) \\+ \"\\/settings\\.ini\"") + "QDir::homePath() + \"/.config/candle.ini\"")))) + (replace 'configure + (lambda _ + (chdir "src") + (invoke "qmake" + (string-append "QMAKE_CC=" + #$(cc-for-target))))) + (replace 'install + (lambda _ + (install-file "Candle" + (string-append #$output "/bin"))))))) + (home-page "https://github.com/Denvi/Candle") + (synopsis "GRBL controller with G-Code visualizer") + (description + "GRBL controller application with G-Code visualizer written in Qt. + +Supported functions: + +@itemize +@item Controlling GRBL-based cnc-machine via console commands, buttons on +form, numpad. +@item Monitoring CNC-machine state. +@item Loading, editing, saving and sending of G-code files to CNC-machine. +@item Visualizing G-code files. +@end itemize") + (license license:gpl3)))) + -- 2.34.1