GNU bug report logs - #78385
[PATCH electronics-team] gnu: yosys: Improve package style.

Previous Next

Package: guix-patches;

Reported by: Cayetano Santos <csantosb <at> inventati.org>

Date: Sun, 11 May 2025 20:23:02 UTC

Severity: normal

Tags: patch

Done: Cayetano Santos <csantosb <at> inventati.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78385: closed ([PATCH electronics-team] gnu: yosys: Improve
 package style.)
Date: Mon, 12 May 2025 12:01:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 12 May 2025 14:00:31 +0200
with message-id <87zffi82e8.fsf <at> inventati.org>
and subject line Closing
has caused the debbugs.gnu.org bug report #78385,
regarding [PATCH electronics-team] gnu: yosys: Improve package style.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78385: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78385
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Cayetano Santos <csantosb <at> inventati.org>
To: guix-patches <at> gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH electronics-team] gnu: yosys: Improve package style.
Date: Sun, 11 May 2025 22:17:21 +0200
* gnu/packages/fpga.scm (yosys): Improve package style.

Change-Id: Ifa88e523d1637ba05166000056830faa53b45706
---

[arguments] <#:phases> {fix-paths}: Replace search-input-file by this-package-input.
{use-external-abc}: Move to fix-paths phase.

 gnu/packages/fpga.scm | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 2298dde595..b1f53560a8 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -205,34 +205,33 @@ (define-public yosys
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'configure 'fix-paths
-            (lambda* (#:key inputs #:allow-other-keys)
+            (lambda _
               (substitute* "backends/smt2/smtio.py"
                 (("\\['z3")
-                 (string-append "['"
-                                (search-input-file inputs "bin/z3"))))
+                 (string-append "['" #$(this-package-input "z3") "/bin/z3")))
               (substitute* "kernel/fstdata.cc"
                 (("vcd2fst")
-                 (search-input-file inputs "bin/vcd2fst")))
+                 (string-append #$(this-package-input "gtkwave")
+                                "/bin/vcd2fst")))
               (substitute* "kernel/driver.cc"
                 (("^#include \"libs/cxxopts/include/cxxopts.hpp\"")
                  "#include <cxxopts.hpp>"))
               (substitute* '("passes/cmds/show.cc" "passes/cmds/viz.cc")
                 (("exec xdot")
-                 (string-append "exec "
-                                (search-input-file inputs "bin/xdot")))
+                 (string-append "exec " #$(this-package-input "xdot")
+                                "/bin/xdot"))
                 (("dot -")
-                 (string-append (search-input-file inputs "bin/dot") " -"))
+                 (string-append #$(this-package-input "graphviz") "/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)))
-          (add-after 'configure 'use-external-abc
-            (lambda* (#:key inputs #:allow-other-keys)
+                 (string-append #$(this-package-input "psmisc") "/bin/fuser")))
               (substitute* '("Makefile")
                 (("ABCEXTERNAL \\?=")
                  (string-append "ABCEXTERNAL = "
-                                (search-input-file inputs "/bin/abc"))))))
+                                #$(this-package-input "abc-yosyshq")
+                                "/bin/abc")))))
+          (replace 'configure
+            (lambda* (#:key make-flags #:allow-other-keys)
+              (apply invoke "make" "config-gcc" make-flags)))
           (add-after 'install 'add-symbolic-link
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Previously this package provided a copy of the "abc"

base-commit: 300d29e69988caf23684f08effa51f621c7ec083
--
2.49.0



[Message part 3 (message/rfc822, inline)]
From: Cayetano Santos <csantosb <at> inventati.org>
To: 78385-done <at> debbugs.gnu.org
Cc: Ekaitz Zarraga <ekaitz <at> elenq.tech>, Gabriel Wicki <gabriel <at> erlikon.ch>,
 78385 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Closing
Date: Mon, 12 May 2025 14:00:31 +0200
[Message part 4 (text/plain, inline)]
>lun. 12 mai 2025 at 20:44, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

> Hm, search-input-file is as good style as this-package-input, if not
> better style, as it errors out early when a searched file is missing.
> It also plays better with inheritance, as the gexps have a tendency to
> bake references that can't be altered (easily) in inherited variants.

My bad, for some reason, I was convinced the this-package-input form was
best suited for cross-compiling / transformations.

Closing, then.

C.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.