all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 56768@debbugs.gnu.org
Subject: [bug#56768] [PATCH] gnu: engineering: Add qucs-s.
Date: Fri, 29 Jul 2022 18:26:53 +0300	[thread overview]
Message-ID: <87fsik0wjm.fsf@gmail.com> (raw)
In-Reply-To: <e339362b-d8ff-e364-380d-c54cb51082a0@telenet.be> (Maxime Devos's message of "Tue, 26 Jul 2022 20:07:46 +0200")


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

Hello Maxime,

thanks you for the patch review!

> Often GUIs have problems with finding icons, could you check whether
> qucs-s works in a pure environment?

I tried to run Qucs-S installed through Guix, like the follows:

--8<---------------cut here---------------start------------->8---
guix shell -D guix
./pre-inst-env guix shell -D --pure qucs-s
qucs-s
--8<---------------cut here---------------end--------------->8---

And all the icons seem to be fine

Although it can be that I don't fully understand what you mean by "pure
environment" in that case.

> 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.

Okay, that's a good point.  I checked the sources for the places where
Qucs-S uses executable paths and added substitutions for that.

I kept NGSpice in "propagated-inputs" because Qucs-S requires it to do
the simulations in runtime.

Also I've added GNU Octave to the "propagated-inputs" and substituted
the path to Octave too.

I tried to run simulations from the examples provided with the Qucs-S
and it seems to me that Qucs-S mostly works as it should.

I should note here that I'm not very good at electronics and such
simulations yet, so you should take what I said above with a grain of
salt indeed.  ;-)

Please check the updated patch.

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

From a4d83e1d5652654db4b6de7bc272ec4a0bfb114f 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 | 54 ++++++++++++++++++++++++++++++++++--
 1 file changed, 52 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 6eefd14d7e..95c6c012a3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3470,8 +3470,7 @@ (define-public libnest2d-for-cura
     (build-system cmake-build-system)
     (inputs
      (list boost clipper nlopt))
-    (arguments
-     `(#:tests? #f
+    (arguments     `(#:tests? #f
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'fix-clipper-detection
@@ -3757,3 +3756,54 @@ (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 octave))
+    (arguments
+     (list #:tests? #f ; no tests
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "qucs/main.cpp"
+                     (("QucsSettings.NgspiceExecutable = ngsp_exe")
+                      (string-append "QucsSettings.NgspiceExecutable = \""
+                                     (assoc-ref inputs "ngspice")
+                                     "/bin/ngspice"
+                                     "\""))
+                     (("QucsSettings.OctaveExecutable = \"octave\" + QString(executableSuffix)")
+                      (string-append "QucsSettings.OctaveExecutable = \""
+                                     (assoc-ref inputs "octave")
+                                     "/bin/octave"
+                                     "\""))))))))
+    (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


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


Thanks,

- 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-29 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 20:02 [bug#56768] [PATCH] gnu: engineering: Add qucs-s Artyom V. Poptsov
2022-07-26 18:07 ` Maxime Devos
2022-07-29 15:26   ` Artyom V. Poptsov [this message]
2022-07-29 16:17     ` Maxime Devos
2022-07-30  6:59       ` Artyom V. Poptsov
2022-08-06 11:42         ` Maxime Devos
2022-08-06 10:15 ` Jean Pierre De Jesus DIAZ via Guix-patches via
2022-09-04 16:00 ` Artyom V. Poptsov

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

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

  git send-email \
    --in-reply-to=87fsik0wjm.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=56768@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.