Subject: [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies.

From: Christopher Baines <[email-masked]>
Date: Wed, 08 Feb 2023 17:14:59 +0000

Simon South <[email-masked]> writes:

> * gnu/packages/fpga.scm (yosys)[inputs]: Move graphviz, psmisc, xdot from
> here...
> [propagated-inputs]: ...to here, to ensure the availability at runtime of
> executables invoked by yosys' "show" command.
> [arguments]: Remove now-obsolete "fix-paths" phase.
> ---
>  gnu/packages/fpga.scm | 20 +++++---------------
>  1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
> index 8effebd921..785d385621 100644
> --- a/gnu/packages/fpga.scm
> +++ b/gnu/packages/fpga.scm
> @@ -157,16 +157,6 @@ (define-public yosys
>                             (string-append "PREFIX=" #$output))
>        #:phases
>        #~(modify-phases %standard-phases
> -          (add-before 'configure 'fix-paths
> -            (lambda* (#:key inputs #:allow-other-keys)
> -              (substitute* "./passes/cmds/show.cc"
> -                (("exec xdot")
> -                 (string-append "exec " (search-input-file inputs
> -                                                           "/bin/xdot")))
> -                (("dot -")
> -                 (string-append (search-input-file inputs "/bin/dot") " -"))
> -                (("fuser")
> -                 (search-input-file inputs "/bin/fuser")))))
>            (replace 'configure
>              (lambda* (#:key make-flags #:allow-other-keys)
>                (apply invoke "make" "config-gcc" make-flags)))
> @@ -211,14 +201,14 @@ (define-public yosys
>             python
>             tcl)) ; tclsh for the tests
>      (inputs
> -     (list graphviz
> -           libffi
> -           psmisc
> +     (list libffi
>             readline
> -           tcl
> -           xdot))
> +           tcl))
>      (propagated-inputs
>       (list abc
> +           graphviz ; for dot
> +           psmisc ; for fuser
> +           xdot
>             z3)) ; should be in path for yosys-smtbmc
>      (home-page "https://yosyshq.net/yosys/")
>      (synopsis "FPGA Verilog RTL synthesizer")

Thanks Simon, I've pushed the first 3 patches from this series to the
master branch now.

For the changes regarding propagated-inputs though, I'm not sure this it
the right direction. Firstly, I think it's possible (and maybe
desirable) to keep the 'fix-paths phase, even if the inputs are changed
to be propagated.

I know you say this is related to yosys show in the commit message, can
you elaborate on why these packages are necessary to have in the users
environment?

Thanks,

Chris