Message ID | 87fsgvm12r.fsf@disroot.org |
---|---|
State | New |
Headers | show |
Series | [bug#57774,v2] Add qucs-s. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Hey, On Tue Sep 13, 2022 at 10:11 PM BST, Garek Dyszel wrote: > + #:phases #~(modify-phases %standard-phases To conserve lots of horizontal space, consider moving the ``modify-phases'' to a new line: > + #:phases > + #~(modify-phases %standard-phases > + (search-input-file inputs "/bin/ngspice") > + [...] > + (search-input-file inputs "/bin/octave") You can just do ``(search-input-file inputs "bin/octave")'', no need for the leading slash. Also, wouldn't you want to patch in the paths for Xyce, SpiceOpus, and Qucsator, too? > + (synopsis "GUI for different circuit simulation kernels") s/different/various/, perhaps? > + > +@itemize > +@item Ngspice (recommended) > +@item Xyce > +@item SpiceOpus > +@item Qucsator (non-spice) > +@end itemize") > + (home-page "https://ra3xdh.github.io/") > + (license license:gpl2+))) > + > (define-public freehdl > (package > (name "freehdl") > -- > 2.37.2 -- (
Hi (, I applied your fixes, but in the process found that qucs-s had already been successfully added before by looking at the package definition for libngspice. This led to the following bug link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236. It looks like support was later dropped because qucs-s still depended on Qt4 at the time, mentioned in this thread: https://lists.gnu.org/archive/html/guix-devel/2016-02/msg00596.html. This suggested it would be a good idea to start from the commit where qucs and qucs-s were removed. Now I'm hacking those old package definitions to work with Qt6. qucs-s 0.0.24 still depends on qt5 (which is already out of date), and I don't want to have to update it right away when this Qt security issue comes up again this year. I'll send an updated patch when that's done. Sorry for jumping around among existing package sources; I suppose how it worked out this time. - Garek At 07:26 2022-09-14 UTC+0100, "(" <paren@disroot.org> wrote: > Hey, > > On Tue Sep 13, 2022 at 10:11 PM BST, Garek Dyszel wrote: >> + #:phases #~(modify-phases %standard-phases > > To conserve lots of horizontal space, consider moving the ``modify-phases'' > to a new line: > >> + #:phases >> + #~(modify-phases %standard-phases > >> + (search-input-file inputs "/bin/ngspice") >> + [...] >> + (search-input-file inputs "/bin/octave") > > You can just do ``(search-input-file inputs "bin/octave")'', no need for the > leading slash. Also, wouldn't you want to patch in the paths for Xyce, > SpiceOpus, and Qucsator, too? > >> + (synopsis "GUI for different circuit simulation kernels") > > s/different/various/, perhaps? > >> + >> +@itemize >> +@item Ngspice (recommended) >> +@item Xyce >> +@item SpiceOpus >> +@item Qucsator (non-spice) >> +@end itemize") >> + (home-page "https://ra3xdh.github.io/") >> + (license license:gpl2+))) >> + >> (define-public freehdl >> (package >> (name "freehdl") >> -- >> 2.37.2 > > > -- (
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index a8b9f1e786..e759134ae4 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -36,6 +36,7 @@ ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2022 Felix Gruber <felgru@posteo.net> +;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -2006,6 +2007,65 @@ (define-public xyce-parallel ,@(alist-delete "trilinos" (package-inputs xyce-serial)))))) +(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 qt-build-system) + (native-inputs (list qttools-5)) + (inputs (list qtbase-5 qtscript qtsvg-5 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" + ;; Use the user's configuration files in + ;; ~/.config/qucs/qucs_s.conf for the + ;; locations of ngspice and octave. If + ;; the locations are not given in + ;; ~/.config/qucs/qucs_s.conf, use the + ;; locations provided by Guix. + (("QString ngsp_exe = \ +QCoreApplication::applicationDirPath\\(\\) \\+") + (string-append + "QString ngsp_exe = \"" + (search-input-file inputs "/bin/ngspice") + "\";")) + (("QDir::separator\\(\\) \\+ \"ngspice\" \\+ \ +executableSuffix;") "") + (("else QucsSettings.OctaveExecutable = \"octave\" \ +\\+ QString\\(executableSuffix\\);") + (string-append + "else QucsSettings.OctaveExecutable = \"" + (search-input-file inputs "/bin/octave") + "\";")))))))) + (synopsis "GUI for different circuit simulation kernels") + (description + "@code{Qucs-S} provides a fork of the Qucs circuit simulator, +which is used as a 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+))) + (define-public freehdl (package (name "freehdl")