From 3830792f316287de22fa62b2adff6aeb2b94a160 Mon Sep 17 00:00:00 2001
* gnu/packages/engineering.scm (candle): New variable.
gnu/packages/engineering.scm | 63 ++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
Toggle diff (73 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index fe8ab13298..a3445343fc 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3688,3 +3688,66 @@ (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+))))
+ ;; 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")
+ (version (git-version "1.2b" revision commit))
+ (url "https://github.com/Denvi/Candle")
+ (file-name (git-file-name name version))
+ "08rqhl6a5a8s67a8yl16944zgcsnnb08xfv4klzyqwlvaqgfp783"))))
+ (build-system gnu-build-system)
+ (native-inputs (list qttools))
+ (inputs (list qtbase-5 qtserialport))
+ (list #:tests? #f ; no tests.
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-sources
+ (substitute* (find-files "." ".*\\.h")
+ (("const char\\* what\\(\\) const override")
+ "const char* what() const noexcept override"))))
+ (add-after 'unpack 'fix-application-settings-path
+ (substitute* "src/frmmain.cpp"
+ (("qApp->applicationDirPath\\(\\) \\+ \"\\/settings\\.ini\"")
+ "QDir::homePath() + \"/.config/candle.ini\""))))
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (string-append "QMAKE_CC="
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (string-append out "/bin"))))))))
+ (home-page "https://github.com/Denvi/Candle")
+ (synopsis "GRBL controller with G-Code visualizer")
+ "GRBL controller application with G-Code visualizer written in Qt.
+@item Controlling GRBL-based cnc-machine via console commands, buttons on
+@item Monitoring CNC-machine state.
+@item Loading, editing, saving and sending of G-code files to CNC-machine.
+@item Visualizing G-code files.
+ (license license:gpl3))))