diff mbox series

[bug#56768] gnu: engineering: Add qucs-s.

Message ID 87ilnlgduf.fsf@gmail.com
State New
Headers show
Series [bug#56768] gnu: engineering: Add qucs-s. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Artyom V. Poptsov July 25, 2022, 8:02 p.m. UTC
Hello,

this patch adds "Qucs-S", a GUI for different circuit simulation
kernels:
  https://github.com/ra3xdh/qucs_s

Currently the package supports only Ngspice simulation kernel, as it is
recommended by the authors and it is readily available in Guix; but in
the future other kernels can be added, namely Xyce (which is in the Guix
too.)
Thanks,

- Artyom

Comments

M July 26, 2022, 6:07 p.m. UTC | #1
> this patch adds "Qucs-S", a GUI for different circuit simulation
Often GUIs have problems with finding icons, could you check whether qucs-s works in a pure environment?

> +    (propagated-inputs (list ngspice))

Propagation is not very robust (e.g. if run directly from the store with 
$(guix build qucs-s)/bin/the-binary), would it be possible to not 
propagate this? E.g., if you are propagating it because of not finding a 
binary, you could use substitute* to insert an appropriate absolute file 
name.

Greetings,
Maxime.
Jean Pierre De Jesus DIAZ Aug. 6, 2022, 10:15 a.m. UTC | #2
Hello Artyom,

Just a nitpick:

>+    (description
>+     "@code{Qucs-S} provides a fancy graphical user interface for a number of

@code{Qucs-S} -> @acronym{Qucs-S, Quite universal circuit simulator with SPICE}

>Yet at least Qucs-S will always use the right Octave/NGSpice path from
>GNU Guix.

If the substitute of the binaries path is only done on the `else' block then
the settings would be respected.

For example, on:

https://github.com/ra3xdh/qucs_s/blob/master/qucs/main.cpp#L130-L136

>    if(settings.contains("NgspiceExecutable")) QucsSettings.NgspiceExecutable = settings.value("NgspiceExecutable").toString();
>    else {
>        QString ngsp_exe = QCoreApplication::applicationDirPath() +
>                QDir::separator() + "ngspice" + executableSuffix;
>        if (!QFile::exists(ngsp_exe)) ngsp_exe = QString("ngspice") + executableSuffix;
>        QucsSettings.NgspiceExecutable = ngsp_exe;
>    }

Can be substituted to:

    if(settings.contains("NgspiceExecutable")) QucsSettings.NgspiceExecutable = settings.value("NgspiceExecutable").toString();
    else {
        QString ngsp_exe = "/gnu/store/<substitute* used here>";
        if (!QFile::exists(ngsp_exe)) ngsp_exe = QString("ngspice") + executableSuffix;
        QucsSettings.NgspiceExecutable = ngsp_exe;
    }

Then if `NgspiceExecutable' is present on the configuration that value will be used, otherwise the default
one provided by GNU Guix. Same applies for the other executable files.

—
Jean-Pierre De Jesus DIAZ
diff mbox series

Patch

From ddc382ec3552c565df1694cf80f0481d0cb55492 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Mon, 25 Jul 2022 22:57:14 +0300
Subject: [PATCH] gnu: Add qucs-s.

* gnu/packages/engineering.scm (qucs-s): New variable.
---
 gnu/packages/engineering.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 6eefd14d7e..141dc613ae 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3757,3 +3757,39 @@  (define-public candle
 @item Visualizing G-code files.
 @end itemize")
       (license license:gpl3+))))
+
+(define-public qucs-s
+  (package
+    (name "qucs-s")
+    (version "0.0.24")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ra3xdh/qucs_s")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1lbkaw0grw9w7d37z5dbhaqi8p57cpf9yp071zp6xrairkgimdx8"))))
+    (build-system cmake-build-system)
+    (native-inputs (list qttools))
+    (inputs (list qtbase-5 qtscript qtsvg))
+    (propagated-inputs (list ngspice))
+    (arguments
+     (list #:tests? #f)) ;no tests
+    (synopsis "GUI for different circuit simulation kernels")
+    (description
+     "@code{Qucs-S} provides a fancy graphical user interface for a number of
+popular circuit simulation engines.  The package contains libraries for
+schematic capture, visualization and components.  The following simulation
+kernels are supported:
+
+@itemize
+@item Ngspice (recommended)
+@item Xyce
+@item SpiceOpus
+@item Qucsator (non-spice)
+@end itemize
+")
+    (home-page "https://ra3xdh.github.io/")
+    (license license:gpl2+)))
-- 
2.34.1