From: Simon South <simon@simonsouth.net>
To: 60429@debbugs.gnu.org
Subject: [bug#60429] [PATCH 3/5] gnu: yosys: Use external abc.
Date: Fri, 30 Dec 2022 11:00:47 -0500 [thread overview]
Message-ID: <3860fcf9632f6c9bbc7c3eb4359a28277f8d0683.1672412713.git.simon@simonsouth.net> (raw)
In-Reply-To: <cover.1672412713.git.simon@simonsouth.net>
* gnu/packages/fpga.scm (yosys)[source]: Remove snippet and associated
"modules" field.
[arguments]: Replace "prepare-abc" phase with "use-external-abc", which
configures the package's build system to use the system's "abc" executable
instead of creating a duplicate; add "add-symbolic-link" phase to preserve
availability of "yosys-abc" command.
[inputs]: Move abc from here...
[propagated-inputs]: ...to here, to ensure its availability at runtime.
---
gnu/packages/fpga.scm | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 479ca3b061..8effebd921 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -147,12 +147,7 @@ (define-public yosys
(sha256
(base32
"0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli"))
- (file-name (git-file-name name version))
- (modules '((guix build utils)))
- (snippet
- #~(begin
- (substitute* "Makefile"
- (("ABCREV = .*") "ABCREV = default\n"))))))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
(list
@@ -175,14 +170,10 @@ (define-public yosys
(replace 'configure
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "config-gcc" make-flags)))
- (add-after 'configure 'prepare-abc
- (lambda* (#:key inputs #:allow-other-keys)
- (mkdir-p "abc")
- (call-with-output-file "abc/Makefile"
- (lambda (port)
- (format port ".PHONY: all\nall:\n\tcp -f abc abc-default\n")))
- (copy-file (search-input-file inputs "/bin/abc") "abc/abc")
- (invoke "chmod" "+w" "abc/abc")))
+ (add-after 'configure 'use-external-abc
+ (lambda _
+ (substitute* '("./Makefile")
+ (("ABCEXTERNAL \\?=") "ABCEXTERNAL = abc"))))
(add-before 'check 'fix-iverilog-references
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(let ((iverilog (search-input-file (or native-inputs inputs)
@@ -202,7 +193,15 @@ (define-public yosys
(("if ! which iverilog") "if ! true")
(("iverilog ") (string-append iverilog " "))
(("iverilog_bin=\".*\"") (string-append "iverilog_bin=\""
- iverilog "\"")))))))))
+ iverilog "\""))))))
+ (add-after 'install 'add-symbolic-link
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Previously this package provided a copy of the "abc"
+ ;; executable in its output, named "yosys-abc". Create a
+ ;; symbolic link so any external uses of that name continue to
+ ;; work.
+ (symlink (search-input-file inputs "/bin/abc")
+ (string-append #$output "/bin/yosys-abc")))))))
(native-inputs
(list bison
flex
@@ -212,15 +211,15 @@ (define-public yosys
python
tcl)) ; tclsh for the tests
(inputs
- (list abc
- graphviz
+ (list graphviz
libffi
psmisc
readline
tcl
xdot))
(propagated-inputs
- (list z3)) ; should be in path for yosys-smtbmc
+ (list abc
+ z3)) ; should be in path for yosys-smtbmc
(home-page "https://yosyshq.net/yosys/")
(synopsis "FPGA Verilog RTL synthesizer")
(description "Yosys synthesizes Verilog-2005.")
--
2.38.1
next prev parent reply other threads:[~2022-12-30 16:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 15:58 [bug#60429] [PATCH 0/5] gnu: yosys: Update to 0.24 Simon South
2022-12-30 16:00 ` [bug#60429] [PATCH 1/5] gnu: yosys: Update source and home-page URLs Simon South
2022-12-30 16:00 ` [bug#60429] [PATCH 2/5] gnu: yosys: Use new package style Simon South
2022-12-30 16:00 ` Simon South [this message]
2022-12-30 16:00 ` [bug#60429] [PATCH 4/5] gnu: yosys: Propagate external dependencies Simon South
2022-12-30 16:00 ` [bug#60429] [PATCH 5/5] gnu: yosys: Update to 0.24 Simon South
2023-01-08 18:31 ` [bug#60429] [PATCH v2 0/5] " Simon South
2023-01-08 18:31 ` [bug#60429] [PATCH v2 1/5] gnu: yosys: Update source and home-page URLs Simon South
2023-01-08 18:31 ` [bug#60429] [PATCH v2 2/5] gnu: yosys: Use new package style Simon South
2023-01-08 18:31 ` [bug#60429] [PATCH v2 3/5] gnu: yosys: Use external abc Simon South
2023-01-08 18:31 ` [bug#60429] [PATCH v2 4/5] gnu: yosys: Propagate external dependencies Simon South
2023-02-08 17:14 ` Christopher Baines
2023-02-09 0:35 ` Simon South
2023-02-09 5:29 ` Liliana Marie Prikler
2023-02-09 16:47 ` Simon South
2023-01-08 18:31 ` [bug#60429] [PATCH v2 5/5] gnu: yosys: Update to 0.25 Simon South
2023-02-10 13:16 ` [bug#60429] [PATCH v3 0/5] gnu: yosys: Update to 0.24 Simon South
2023-02-10 13:16 ` [bug#60429] [PATCH v3 4/5] gnu: yosys: Do not propagate any inputs Simon South
2023-02-10 13:16 ` [bug#60429] [PATCH v3 5/5] gnu: yosys: Update to 0.26 Simon South
2023-02-11 20:38 ` bug#60429: [PATCH v3 0/5] gnu: yosys: Update to 0.24 Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3860fcf9632f6c9bbc7c3eb4359a28277f8d0683.1672412713.git.simon@simonsouth.net \
--to=simon@simonsouth.net \
--cc=60429@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).