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 KFdsMkQMu2PPVgAAbAwnHQ (envelope-from ) for ; Sun, 08 Jan 2023 19:32:36 +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 WH9qMUQMu2PfcgEAG6o9tA (envelope-from ) for ; Sun, 08 Jan 2023 19:32:36 +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 69C86E360 for ; Sun, 8 Jan 2023 19:32:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEaSj-0003xC-B0; Sun, 08 Jan 2023 13:32:05 -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-0003w2-Kw 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 1pEaSh-0005Gw-Bq 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 1pEaSh-0002Lv-7P for guix-patches@gnu.org; Sun, 08 Jan 2023 13:32:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60429] [PATCH v2 2/5] gnu: yosys: Use new package style. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Jan 2023 18:32: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.16732027098980 (code B ref 60429); Sun, 08 Jan 2023 18:32:03 +0000 Received: (at 60429) by debbugs.gnu.org; 8 Jan 2023 18:31:49 +0000 Received: from localhost ([127.0.0.1]:34662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSS-0002Kg-RE for submit@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:49 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEaSN-0002Je-Dy for 60429@debbugs.gnu.org; Sun, 08 Jan 2023 13:31:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 16BC967723 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 rJUstA6cLxng 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 886136774E for <60429@debbugs.gnu.org>; Sun, 8 Jan 2023 18:31:37 +0000 (UTC) From: Simon South Date: Sun, 8 Jan 2023 13:31:28 -0500 Message-Id: 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673202756; 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=x5FaXZYWQrOjgi3MlhyeSIurqUAkwc0eUHBViSK2Qt4=; b=HV7AgRaAjG6zUXXSjSCFfthqFGeFMPE4Wqcl41WkzoOiszPn/2mqIEGNDs74G+Y2b7CI4M rSeupPDSUEp2Ki8I9tGPnRX4YXqYu6hMMGjW8xjzx9T19lzTbyqwxJQDVyOhEj3iBQzabl 0Exz3M8gh4PZ/u5dCjDGFL0OLJT2vwhsMADdH6/f5zV+4WC8C1GdpCVR3oOy8zNHmYhdUA NUY6FLqcHBLySIJgYdOfZbPTsgQGU0F/quFyWmKys6SQbVGubG/GPZbUlXOMcvKkEi6udu ycB9VeZ8JfPUH4aOvCyJHhj6CXO+wm1GDOpl36iFx4NJPop7nNBWeRzB20LzGA== 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-Seal: i=1; s=key1; d=yhetil.org; t=1673202756; a=rsa-sha256; cv=none; b=O+hGh6GAg+VlJwwqkT3kiU9+83Qf8rram0jbay7BkqUA7Y21+ns9+T6Ztsg2JFk3ch86Ge UU3DcjJws42s7yrqya9pQpGOdyDI/+y+E/WanfmyQrMvpftrYr5fhcPmhOyyFTLsvJWYVw djseYVNhrdIBkuMw81m8QuUzpVkO/zBsWCoPirOMKXPMKKknmOuxiQKl9lJrl4KXGBPobm kO1/vEjplS6Y6Uoz4xA3DtUsSY+D8YdjBJLY7EfeJPACja5Bb9pbEu3w9wGB/BPO0KFbKl SwtNeJa7yjQTC/eEsEJaBFYcYVEqfF089tem9oUHJ1B3n52Nov/ddM/6iHRySQ== X-Spam-Score: -0.27 X-Migadu-Queue-Id: 69C86E360 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: scn1.migadu.com X-Migadu-Spam-Score: -0.27 X-TUID: fIv3bkY5Mvyl * 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/") -- 2.38.1