unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: Jean Pierre De Jesus DIAZ <me@jeandudey.tech>
Cc: "56354@debbugs.gnu.org" <56354@debbugs.gnu.org>
Subject: [bug#56354] [PATCH] gnu: engineering: Add candle.
Date: Mon, 11 Jul 2022 21:39:03 +0300	[thread overview]
Message-ID: <87a69fsddk.fsf@gmail.com> (raw)
In-Reply-To: <M7JKaZZ3AMO61QYlYKULMbrhV6ckNohCUBt_vyaGBKaMsQv3uZqHxtrn9ZJPOErEC7WobqLtq436qf4LPIWGQpVhIT9hz3ER60XjEagErQk=@jeandudey.tech> (Jean Pierre De Jesus DIAZ's message of "Mon, 11 Jul 2022 11:55:52 +0000")


[-- Attachment #1.1: Type: text/plain, Size: 935 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-engineering-Add-candle.patch --]
[-- Type: text/x-diff, Size: 3663 bytes --]

From 7aac50730febeb95d0f7a4ab1cbb6e7dfb632553 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
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


[-- Attachment #1.3: Type: text/plain, Size: 219 bytes --]


- Artyom

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

  reply	other threads:[~2022-07-11 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02  9:47 [bug#56354] [PATCH] gnu: engineering: Add candle Artyom V. Poptsov
2022-07-04  3:36 ` Artyom V. Poptsov
2022-07-09 13:43   ` Artyom V. Poptsov
2022-07-05 12:16 ` [bug#56354] Review Jean Pierre De Jesus DIAZ via Guix-patches via
2022-07-11 11:55 ` [bug#56354] [PATCH] gnu: engineering: Add candle Jean Pierre De Jesus DIAZ via Guix-patches via
2022-07-11 18:39   ` Artyom V. Poptsov [this message]
2022-07-12 21:59     ` bug#56354: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a69fsddk.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=56354@debbugs.gnu.org \
    --cc=me@jeandudey.tech \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).