Subject: Re: [PATCH v4 1/3] gnu: freehdl: Fix gvhdl and freehdl-gennodes scripts.

From: [email-masked] (Ludovic Courtès)
Date: Fri, 27 Oct 2017 08:19:16 -0700

Hi Theodoros,

Theodoros Foradis <[email-masked]> skribis:

> * gnu/packages/engineering.scm (freehdl):
> [arguments] <phases>: Add patch-gvhdl and patch-freehdl-gennodes phases.
> Wrap-program "/bin/gvhdl" in make-wrapper phase.
> [inputs]: Add guile-2.2.

Applied with this change, which makes sure we’re referring to the right
“guile”:

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 92745852d..1d686271d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1456,9 +1456,10 @@ parallel computing platforms.  It also supports serial execution.")
                (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
              #t))
          (add-after 'patch-gvhdl 'patch-freehdl-gennodes
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "freehdl/freehdl-gennodes.in"
-               (("guile") (which "guile"))
+               (("guile")
+                (string-append (assoc-ref inputs "guile") "/bin/guile"))
                (("\\(debug") ";(debug")
                (("\\(@ ") "(apply-emit")
                (("\\(@@ ") "(apply-mini-format"))
@@ -1476,6 +1477,8 @@ parallel computing platforms.  It also supports serial execution.")
          (add-after 'install-scripts 'make-wrapper
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
+               ;; 'gvhdl' invokes the C compiler directly, so hard-code its
+               ;; file name.
                (wrap-program (string-append out "/bin/gvhdl")
                  `("CPLUS_INCLUDE_PATH" ":" prefix
                    (,(string-append (assoc-ref inputs "gcc-toolchain")

> +       ("gcc-toolchain" ,gcc-toolchain-5)

Did you choose version 5 on purpose or would any version work?
In the latter case, I’d replace it with ‘gcc-toolchain’.

Thanks!

Ludo’.