From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iCCyHVUMu2N9rgAAbAwnHQ (envelope-from ) for ; Sun, 08 Jan 2023 19:32:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WM+xHFUMu2McdAEAG6o9tA (envelope-from ) for ; Sun, 08 Jan 2023 19:32:53 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 373FBE530 for ; Sun, 8 Jan 2023 19:32:53 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEaTA-00042X-Ec; Sun, 08 Jan 2023 13:32:32 -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 1pEaSh-0003vz-KD for guix-patches@gnu.org; Sun, 08 Jan 2023 13:32: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 1pEaSg-0005Gs-4p for guix-patches@gnu.org; Sun, 08 Jan 2023 13:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pEaSf-0002LY-Vl for guix-patches@gnu.org; Sun, 08 Jan 2023 13:32:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH v2 3/5] gnu: yosys: Use external abc. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Jan 2023 18:32:01 +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.16732027088959 (code B ref 60429); Sun, 08 Jan 2023 18:32:01 +0000 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:48 +0000 Received: from localhost ([127.0.0.1]:34656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSR-0002KP-KN for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:48 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Jf-CN for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 31C3B6774E for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w7oOhJGmuiUe for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +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 A12AD67790 for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South Date: Sun, 8 Jan 2023 13:31:29 -0500 Message-Id: <5ab17e11b0670fff010bc169218f60f89e37df0c.1673202235.git.simon@simonsouth.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673202773; a=rsa-sha256; cv=none; b=o4Hg+ogCvmc9OGdf5OQm0pZQZijvviLh8a0XdA/u4q+7oGztr36faINksEnRV19opKbJ28 jTol7jMpNy9HYsIFcMRsoJE0EyJpRgWZ/QVnZ7lBwGpyI6kbyn7FM81zlUBdq1j12aMPQ1 BBb0s+ZZdvsgiEIMx6EXxAzYv1C9B1nvYTRVIPK8F6iiy6yQNB8xbkNLbIyM+d8RmxlQxa /+c57fFAdpHqNLmimxklA9GkJEuraVqjmZPBCwp7kx4yZgajl4WOcOjtJWpEWqNBckl/9z O68QuUgIyh1KuXoEVLPXlpcTVukRlWwbJ4hExLS2Z+IlOSHMuAIjcWiEz4qAVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673202773; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=PYwvR8l3yGqaViYicEckfOgtPfTmil395tSdX8lOzZI=; b=Z7jJ1BLh/gts+XRJlzQm8MLnT6My4C0AF8ZzV2xw7UFg1edSIHa1TSYEj0dHtAEGt8uM/O 05u3fZmirhbmQFC0jqiUYUN9UVlHbpUmhezbdsLPu+UeK833HU+IYigzkHjjwdOUnce09f QPoXWehIwscZIqy6Nqm+CzTBVuM3vgM6R/ho4Kb7Z+QpidU92CwaMHfE96PIEf2LC/WiT/ uUeevPpdcA/EiA69P8EQZIIXP5XmGPG4LzX91pkg67Shy3Wqvs23H5cWkS/cLSu8nZ1/tD keiJ033ZsHvfNYUOCM/nnYSF2lQoz9uKnFZTiDh+wdvKvoxR74TD7rQJ6a0l7w== X-Spam-Score: -0.87 X-Migadu-Queue-Id: 373FBE530 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -0.87 X-TUID: ktq4tOrd2VDZ * 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