all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#73570] [PATCH] gnu: ngspice: Preserve libngspice inputs.
@ 2024-09-30 19:38 Richard Sent
  0 siblings, 0 replies; only message in thread
From: Richard Sent @ 2024-09-30 19:38 UTC (permalink / raw)
  To: 73570; +Cc: Richard Sent

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:

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

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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-30 19:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 19:38 [bug#73570] [PATCH] gnu: ngspice: Preserve libngspice inputs Richard Sent

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.