Message ID | 87v8rfxf06.fsf@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bug#56768] gnu: engineering: Add qucs-s. | expand |
On 30-07-2022 08:59, Artyom V. Poptsov wrote: >> ... as you have observed, things work even when they aren't propagated >> (at least for qtbase etc., ngspice and octave have not yet been >> tested). > I usually put into "propagated-inputs" packages that provide some binary > that the current package use in the runtime. > > So do you mean that I should rely only on "inputs" package property, and > the inputs will be propagated anyway if they're in use by the package? > Yes to the first (at least in this case, propagation is sometimes hard to avoid), no to the second. Propagation happens only for propagated-inputs; however, if they are 'in use' by the package by ending up in the references, then the GC won't remove the store items. The GC and propagation are independent mechanisms. > Less experimentally, the propagated- in propagated-inputs means only > that: propagation -- the dependencies are still installed even if they > aren't propagated, because the substitute* inserts a reference so the > GC knows to not delete it, the only difference is that the dependency > isn't automatically put in the profile when not propagating. Here, I meant with 'installed' = entry in /gnu/store is downloaded or built and kept, not 'added to ~/.guix-profile or equivalent' -- the latter is propagation. > So the next time Qucs-S run it gets the paths from the configuration > file. > > I changed the substitutions so Qucs-S will ignore the paths to Octave > and NGSpice from the configuration and will always use the paths > provided by Guix. Also any custom paths to Octave and NGSpice will be > overwritten in the config when the application exits. > > That is sub-optimal in my view as we're messing up with the application > configuration logic and if a user wants to change those paths he or she > will be able to remove the config and set the paths in the startup > configuration dialogue, but the settings will have no effect; that will > be a bit confusing. > > Yet at least Qucs-S will always use the right Octave/NGSpice path from > GNU Guix. > > What do you think? > > Here's the patch. It's not ideal that the ngspice cannot be overridden in the configuration, but OTOH we have --with-input. I think it's acceptable, though if there are any users that would like to override in the configuration, we might need to propagate it again and remove the substitute* -- or better, though more work: patch qucs-s to use the configuration when explicitly set by the user and don't write /gnu/store/... inside it automatically, with /gnu/store/... as a fallback when it is not set. Greetings, Maxime.
From 9888a6b0169bd3b9f158749f164b2fb1ebd5603a 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 | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 6eefd14d7e..4cd9e2767a 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3757,3 +3757,51 @@ (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 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 = .*;") + (string-append + "QucsSettings.NgspiceExecutable = \"" + (search-input-file inputs "/bin/ngspice") + "\";")) + (("QucsSettings.OctaveExecutable = .*;") + (string-append + "QucsSettings.OctaveExecutable = \"" + (search-input-file inputs "/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