From patchwork Fri Dec 30 16:00:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 45707 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D99C027BBEB; Fri, 30 Dec 2022 16:01:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C117E27BBE9 for ; Fri, 30 Dec 2022 16:01:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBHok-0008Gx-5Z; Fri, 30 Dec 2022 11:01:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBHod-0008EO-43 for guix-patches@gnu.org; Fri, 30 Dec 2022 11:01:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBHoc-0005lr-BJ for guix-patches@gnu.org; Fri, 30 Dec 2022 11:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBHoc-0000Xx-2g for guix-patches@gnu.org; Fri, 30 Dec 2022 11:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH 1/5] gnu: yosys: Update source and home-page URLs. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Dec 2022 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60429@debbugs.gnu.org Received: via spool by 60429-submit@debbugs.gnu.org id=B60429.16724160592085 (code B ref 60429); Fri, 30 Dec 2022 16:01:02 +0000 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:00:59 +0000 Received: from localhost ([127.0.0.1]:35964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoY-0000XP-Qi for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:59 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoX-0000Ww-HY for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:57 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 5C86CE7B74 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AFKuQOenWjh9 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 0AE08E7B5D for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South Date: Fri, 30 Dec 2022 11:00:45 -0500 Message-Id: <42363f6bff2eea2b49eb7058cf03eda11fd79131.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fpga.scm (yosys)[source]: Update source-repository URL. [home-page]: Update URL. --- gnu/packages/fpga.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index acce5f8f82..45aadf8ea4 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -141,7 +141,7 @@ (define-public yosys (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/cliffordwolf/yosys") + (url "https://github.com/YosysHQ/yosys") (commit (string-append "yosys-" version)) (recursive? #t))) ; for the ‘iverilog’ submodule (sha256 @@ -223,7 +223,7 @@ (define-public yosys abc)) (propagated-inputs (list z3)) ; should be in path for yosys-smtbmc - (home-page "http://www.clifford.at/yosys/") + (home-page "https://yosyshq.net/yosys/") (synopsis "FPGA Verilog RTL synthesizer") (description "Yosys synthesizes Verilog-2005.") (license license:isc))) From patchwork Fri Dec 30 16:00:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 45710 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7F66227BBE9; Fri, 30 Dec 2022 16:02:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 02EBC27BBED for ; Fri, 30 Dec 2022 16:02:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBHpi-0000WS-KT; Fri, 30 Dec 2022 11:02:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBHpb-0000Uw-7c for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBHpa-0005xe-V3 for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBHpa-0000a4-Qz for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH 2/5] gnu: yosys: Use new package style. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Dec 2022 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60429@debbugs.gnu.org Received: via spool by 60429-submit@debbugs.gnu.org id=B60429.16724160652139 (code B ref 60429); Fri, 30 Dec 2022 16:02:02 +0000 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:05 +0000 Received: from localhost ([127.0.0.1]:35969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoe-0000YK-7N for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:05 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoX-0000Wx-P3 for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 9A379E7B7C for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jV-f7ilx57RT for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 24C32E7B5F for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South Date: Fri, 30 Dec 2022 11:00:46 -0500 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fpga.scm (yosys)[source]: Use gexp in snippet and don't explicitly return #t. [arguments]: Use gexps; use search-input-file to locate executables; simplify parameters to "configure" phase; don't explicitly return #t from phases. [native-inputs]: Sort alphabetically. [inputs]: Sort alphabetically. --- gnu/packages/fpga.scm | 122 +++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 45aadf8ea4..479ca3b061 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -150,77 +150,75 @@ (define-public yosys (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet - '(begin - (substitute* "Makefile" - (("ABCREV = .*") "ABCREV = default\n")) - #t)))) + #~(begin + (substitute* "Makefile" + (("ABCREV = .*") "ABCREV = default\n")))))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - #:make-flags (list "CC=gcc" - "CXX=g++" - (string-append "PREFIX=" %output)) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'fix-paths - (lambda _ - (substitute* "./passes/cmds/show.cc" - (("exec xdot") (string-append "exec " (which "xdot"))) - (("dot -") (string-append (which "dot") " -")) - (("fuser") (which "fuser"))) - #t)) - (replace 'configure - (lambda* (#:key inputs (make-flags '()) #:allow-other-keys) - (apply invoke "make" "config-gcc" make-flags))) - (add-after 'configure 'prepare-abc - (lambda* (#:key inputs #:allow-other-keys) - (let* ((sourceabc (assoc-ref inputs "abc")) - (sourcebin (string-append sourceabc "/bin")) - (source (string-append sourcebin "/abc"))) - (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 source "abc/abc") - (invoke "chmod" "+w" "abc/abc")))) + (list + #:test-target "test" + #:make-flags #~(list "CC=gcc" + "CXX=g++" + (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))) + (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-before 'check 'fix-iverilog-references - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let* ((xinputs (or native-inputs inputs)) - (xdirname (assoc-ref xinputs "iverilog")) - (iverilog (string-append xdirname "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\""))) - #t)))))) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((iverilog (search-input-file (or native-inputs inputs) + "/bin/iverilog"))) + (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" + "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" + "./techlibs/ice40/tests/test_bram.sh" + "./techlibs/ice40/tests/test_ffs.sh" + "./techlibs/xilinx/tests/bram1.sh" + "./techlibs/xilinx/tests/bram2.sh" + "./tests/bram/run-single.sh" + "./tests/realmath/run-test.sh" + "./tests/simple/run-test.sh" + "./tests/techmap/mem_simple_4x1_runtest.sh" + "./tests/tools/autotest.sh" + "./tests/vloghtb/common.sh") + (("if ! which iverilog") "if ! true") + (("iverilog ") (string-append iverilog " ")) + (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" + iverilog "\""))))))))) (native-inputs - (list pkg-config - python - bison + (list bison flex gawk ; for the tests and "make" progress pretty-printing - tcl ; tclsh for the tests - iverilog)) ; for the tests + iverilog ; for the tests + pkg-config + python + tcl)) ; tclsh for the tests (inputs - (list tcl - readline - libffi + (list abc graphviz + libffi psmisc - xdot - abc)) + readline + tcl + xdot)) (propagated-inputs (list z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/") From patchwork Fri Dec 30 16:00:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 45708 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C7DC627BBED; Fri, 30 Dec 2022 16:02:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EAB7F27BBE9 for ; Fri, 30 Dec 2022 16:02:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBHpf-0000Vi-Qq; Fri, 30 Dec 2022 11:02:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBHpa-0000Uo-SN for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBHpa-0005xZ-Jt for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBHpa-0000Zx-Ew for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH 3/5] gnu: yosys: Use external abc. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Dec 2022 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60429@debbugs.gnu.org Received: via spool by 60429-submit@debbugs.gnu.org id=B60429.16724160642131 (code B ref 60429); Fri, 30 Dec 2022 16:02:02 +0000 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:04 +0000 Received: from localhost ([127.0.0.1]:35967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHod-0000YI-LJ for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:04 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoX-0000Wy-Po for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id A4957E7B5F for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EuhBgnV8zwEl for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 3E160E7B69 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South Date: Fri, 30 Dec 2022 11:00:47 -0500 Message-Id: <3860fcf9632f6c9bbc7c3eb4359a28277f8d0683.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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.") From patchwork Fri Dec 30 16:00:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 45711 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9B7A727BBEB; Fri, 30 Dec 2022 16:02:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CA52027BBE9 for ; Fri, 30 Dec 2022 16:02:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBHph-0000WH-Ei; Fri, 30 Dec 2022 11:02:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBHpb-0000V6-OW for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBHpb-0005xk-Bj for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBHpb-0000aB-6v for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH 4/5] gnu: yosys: Propagate external dependencies. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Dec 2022 16:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60429@debbugs.gnu.org Received: via spool by 60429-submit@debbugs.gnu.org id=B60429.16724160662147 (code B ref 60429); Fri, 30 Dec 2022 16:02:03 +0000 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:06 +0000 Received: from localhost ([127.0.0.1]:35971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHof-0000YS-9R for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:05 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoY-0000Wz-07 for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id D79CBE7B69 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TRmRkEHKDQBN for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 574B4E7B75 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South Date: Fri, 30 Dec 2022 11:00:48 -0500 Message-Id: <477fccd0f411dc2e6cccd91106116e6d71fc58f9.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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") From patchwork Fri Dec 30 16:00:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 45709 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C0E7F27BBEB; Fri, 30 Dec 2022 16:02:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AF2E227BBE9 for ; Fri, 30 Dec 2022 16:02:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBHpi-0000WR-Cm; Fri, 30 Dec 2022 11:02:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBHpe-0000VH-3t for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBHpb-0005xr-Nh for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBHpb-0000aJ-Iw for guix-patches@gnu.org; Fri, 30 Dec 2022 11:02:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH 5/5] gnu: yosys: Update to 0.24. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Dec 2022 16:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60429@debbugs.gnu.org Received: via spool by 60429-submit@debbugs.gnu.org id=B60429.16724160662153 (code B ref 60429); Fri, 30 Dec 2022 16:02:03 +0000 Received: (at 60429) by debbugs.gnu.org; 30 Dec 2022 16:01:06 +0000 Received: from localhost ([127.0.0.1]:35973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHof-0000Ya-So for submit@debbugs.gnu.org; Fri, 30 Dec 2022 11:01:06 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:41976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBHoY-0000X1-Gw for 60429@debbugs.gnu.org; Fri, 30 Dec 2022 11:00:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 58970E7B75 for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hbfOilSpDZ_l for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 73BA0E7B5D for <60429@debbugs.gnu.org>; Fri, 30 Dec 2022 16:00:52 +0000 (UTC) From: Simon South Date: Fri, 30 Dec 2022 11:00:49 -0500 Message-Id: <67ee629dc59d691f639ad436935091d26bbf4aec.1672412713.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fpga.scm (yosys): Update to 0.24. [arguments]: Remove obsolete "fix-iverilog-references" phase. [inputs]: Add zlib. [propagated-inputs]: Add gtkwave, python, python-click. --- gnu/packages/fpga.scm | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 785d385621..d3532069e8 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -137,16 +137,15 @@ (define-public iverilog (define-public yosys (package (name "yosys") - (version "0.9") + (version "0.24") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/YosysHQ/yosys") - (commit (string-append "yosys-" version)) - (recursive? #t))) ; for the ‘iverilog’ submodule + (commit (string-append "yosys-" version)))) (sha256 - (base32 - "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli")) + (base32 + "1hrlqq9850j0160z9ibcia8fp0xxn0iakh0yb69kjzb6ffgjjn3d")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -164,26 +163,6 @@ (define-public yosys (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) - "/bin/iverilog"))) - (substitute* '("./manual/CHAPTER_StateOfTheArt/synth.sh" - "./manual/CHAPTER_StateOfTheArt/validate_tb.sh" - "./techlibs/ice40/tests/test_bram.sh" - "./techlibs/ice40/tests/test_ffs.sh" - "./techlibs/xilinx/tests/bram1.sh" - "./techlibs/xilinx/tests/bram2.sh" - "./tests/bram/run-single.sh" - "./tests/realmath/run-test.sh" - "./tests/simple/run-test.sh" - "./tests/techmap/mem_simple_4x1_runtest.sh" - "./tests/tools/autotest.sh" - "./tests/vloghtb/common.sh") - (("if ! which iverilog") "if ! true") - (("iverilog ") (string-append iverilog " ")) - (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\"" - iverilog "\"")))))) (add-after 'install 'add-symbolic-link (lambda* (#:key inputs #:allow-other-keys) ;; Previously this package provided a copy of the "abc" @@ -203,11 +182,15 @@ (define-public yosys (inputs (list libffi readline - tcl)) + tcl + zlib)) (propagated-inputs (list abc graphviz ; for dot + gtkwave ; for vcd2fst psmisc ; for fuser + python + python-click xdot z3)) ; should be in path for yosys-smtbmc (home-page "https://yosyshq.net/yosys/")