summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2021-05-20 23:35:48 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2021-05-20 23:45:15 +0200
commitf7d2ae57543ae6afe14434877d7480b15dcbb5b7 (patch)
tree9393623823b7accaee757cfbfbcc44d6e1aa7ff1
parentcf95957985fe0a3d7213aebcf02549e8ec9a30ce (diff)
downloadguix-f7d2ae57543ae6afe14434877d7480b15dcbb5b7.tar.gz
gnu: kicad: Fix ngspice support.
Fixes <https://bugs.gnu.org/48336>.

* gnu/packages/engineering.scm (kicad)[arguments]: Add 'fix-ngspice-detection'
  phase.
-rw-r--r--gnu/packages/engineering.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b053d0e328..5a97d25b27 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
 ;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -923,6 +924,13 @@ Emacs).")
              "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-ngspice-detection
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "eeschema/CMakeLists.txt"
+               (("NGSPICE_DLL_FILE=\"\\$\\{NGSPICE_DLL_FILE\\}\"")
+                (string-append "NGSPICE_DLL_FILE=\""
+                               (assoc-ref inputs "libngspice")
+                               "/lib/libngspice.so\"")))))
          (add-after 'install 'install-translations
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (copy-recursively (assoc-ref inputs "kicad-i18n")