[PATCH] gnu: ngspice: Preserve libngspice inputs.

  • Open
  • quality assurance status badge
Details
One participant
  • Richard Sent
Owner
unassigned
Submitted by
Richard Sent
Severity
normal
R
R
Richard Sent wrote 3 days ago
(address . guix-patches@gnu.org)(name . Richard Sent)(address . richard@freakingpenguin.com)
51aa2d68e01d38caf5fe7652c6c4a6a204beab19.1727725137.git.richard@freakingpenguin.com
If inputs are lost between libngspice and ngspice, the configure script will
emit warnings (e.g. bison) or disable functionality (libxaw and X11) in the
executable.

* gnu/packages/engineering.scm (ngspice): Modify libngspice inputs instead of
replacing them.

Change-Id: Ia66fcffba3032b0a37289c60ced12c98b705b548
---
Hi all,

This fixes an issue where functionality in ngspice that should be
enabled would be disabled, most notably X11 support.

To test this, you can use this file:

Toggle quote (17 lines)
> .title dual rc ladder
> * file name rcrcac.cir
> R1 int in 10k
> V1 in 0 dc 0 ac 1 PULSE (0 5 1u 1u 1u 1 1)
> R2 out int 1k
> C1 int 0 1u
> C2 out 0 100n
>
> .control
> ac dec 10 1 100k
> # "Interactive" X11 output.
> plot vdb(out)
> plot ph(out)
> .endc
>
> .end

Without this patch, "$ guix shell ngspice -- ngspice file.cir" fails
to display graphs, printing "Can't open viewport for graphics."

This also fixes a couple warnings logged during the configure phase,
e.g. bison not found.

gnu/packages/engineering.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index db35c2532c..e046b6de07 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2023 pinoaffe <pinoaffe@gmail.com>
;;; Copyright © 2024 Juliana Sims <juli@incana.org>
;;; Copyright © 2024 Nguy?n Gia Phong <mcsinyx@disroot.org>
+;;; Copyright © 2024 Richard Sent <richard@freakingpenguin.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2095,8 +2096,14 @@ (define-public ngspice
((#:phases phases)
#~(modify-phases #$phases
(delete 'delete-scripts)))))
- (native-inputs (list perl))
- (inputs (list libngspice readline))))
+ (native-inputs (modify-inputs (package-native-inputs libngspice)
+ (prepend perl)))
+ (inputs (modify-inputs (package-inputs libngspice)
+ ;; Make sure libngspice inputs are preserved. The configure
+ ;; script will complain and potentially disable functionality if
+ ;; inputs are not found when the executable and library are
+ ;; built in separate steps. e.g. libxaw and X11 support.
+ (prepend libngspice readline)))))
(define trilinos-serial-xyce
;; Note: This is a Trilinos containing only the packages Xyce needs, so we

base-commit: ee64bcfb796ef36db4b63f79540627fb25f3320a
--
2.46.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73570@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73570
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch