From unknown Tue Jun 17 20:19:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77330 <77330@debbugs.gnu.org> To: bug#77330 <77330@debbugs.gnu.org> Subject: Status: [PATCH v2] gnu: nextpnr: split devices. Reply-To: bug#77330 <77330@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:19:17 +0000 retitle 77330 [PATCH v2] gnu: nextpnr: split devices. reassign 77330 guix-patches submitter 77330 Cayetano Santos severity 77330 normal tag 77330 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 28 05:48:55 2025 Received: (at submit) by debbugs.gnu.org; 28 Mar 2025 09:48:56 +0000 Received: from localhost ([127.0.0.1]:52910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ty6Kd-0000HA-36 for submit@debbugs.gnu.org; Fri, 28 Mar 2025 05:48:55 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48052) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ty6Ka-0000Gv-Hn for submit@debbugs.gnu.org; Fri, 28 Mar 2025 05:48:53 -0400 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 1ty6KV-0001HU-3q for guix-patches@gnu.org; Fri, 28 Mar 2025 05:48:47 -0400 Received: from devianza.investici.org ([198.167.222.108]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ty6KQ-000327-D3 for guix-patches@gnu.org; Fri, 28 Mar 2025 05:48:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1743155318; bh=LLjuf7MQzWmUWxUZ2VHx2p1il4dscHuSDG2oqtoW4Rw=; h=From:To:Cc:Subject:Date:From; b=WSgcwbL+aQhvVMk94D2kJ/2qC7sEE11IjlCaaJNChl2n9ZHzksT8kBRw3XQ3XmZGA PuzgwlE2xvmSHONWnqQ79rntNWZxZqt/LJcX/FkKc2beO01z54ZVmaWhGAlE4gxsrP RTsnS75MmtTlQWHQSD/+X6df1Bs37300JBY3eGQM= Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4ZPG1f5rtxz6vGd; Fri, 28 Mar 2025 09:48:38 +0000 (UTC) Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4ZPG1f4LMCz6vFY; Fri, 28 Mar 2025 09:48:38 +0000 (UTC) From: Cayetano Santos To: 77114@debbugs.gnu.org Subject: [PATCH v2] gnu: nextpnr: split devices. Date: Fri, 28 Mar 2025 10:48:10 +0100 Message-ID: <50db8630c9ee69345a7fe2be4da217932021365e.1743155290.git.csantosb@inventati.org> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=198.167.222.108; envelope-from=csantosb@inventati.org; helo=devianza.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Cayetano Santos via Guix-patches via X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) From: Cayetano Santos via Guix-patches via * gnu/packages/fpga.scm (nextpnr): split-devices. Change-Id: I681dfa90a0ace3b507f3b56f3ac7d90227345606 Replace old nextpnr-ice40 by a common nextpnr package, plus a device specific nextpnr-ice40 which inherits from it. Other device packages will follow. - compliant with #77067 (ice40 depends on icestorm) - update to 0.8 - update substitutions in Makefiles - addapt config and make flags to each package - include tests from icestorm in nextpnr-ice40 Change-Id: Icbf9459347fefdcaaa43e7a6a5682eb0fb33ffe0 --- gnu/packages/fpga.scm | 205 +++++++++++++++++++++++------------------- 1 file changed, 115 insertions(+), 90 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 893e875276..20ee787e0f 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -313,102 +313,127 @@ (define-public icestorm Includes the actual FTDI connector.") (license license:isc)))) -(define-public nextpnr-ice40 - (let* ((version "0.7") - (tag (string-append "nextpnr-" version))) - (package - (name "nextpnr-ice40") - (version version) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/YosysHQ/nextpnr") - (commit tag) - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0sbhqscgmlk4q2207rsqsw99qx4fyrxx1hsd669lrk42gmk3s9lm")) - (modules '((guix build utils))) - (snippet - #~(begin - ;; Remove bundled source code for which Guix has packages. - ;; Note the bundled copies of json11 and python-console contain - ;; modifications, while QtPropertyBrowser appears to be - ;; abandoned and without an official source. - ;; fpga-interchange-schema is used only by the - ;; "fpga_interchange" architecture target, which this package - ;; doesn't build. + +(define nextpnr + (package + (name "nextpnr") + (version "0.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/YosysHQ/nextpnr/") + (commit (string-append "nextpnr-" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0p53a2gl89hf3hfwdxs6pykxyrk82j4lqpwd1fqia2y0c9r2gjlm")))) + (build-system qt-build-system) + (arguments + (list + #:cmake cmake + #:out-of-source? #t + #:configure-flags + #~(list "-DBUILD_GUI=OFF" + "-DUSE_OPENMP=yes" + "-DBUILD_TESTS=ON" + (string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version) + "-DUSE_IPO=OFF") + #:phases + #~(modify-phases %standard-phases + ;; Remove bundled source code for which Guix has packages. + ;; Note the bundled copies of json11 and python-console contain + ;; modifications, while QtPropertyBrowser appears to be + ;; abandoned and without an official source. + ;; fpga-interchange-schema is used only by the + ;; "fpga_interchange" architecture target, which this package + ;; doesn't build. + (add-after 'unpack 'remove-deps + (lambda _ (with-directory-excursion "3rdparty" (for-each delete-file-recursively '("googletest" "imgui" "pybind11" "qtimgui" - "sanitizers-cmake"))) - - ;; Remove references to unbundled code and link against external - ;; libraries instead. + "sanitizers-cmake" "corrosion"))))) + ;; Remove references to unbundled code and link against external + ;; libraries instead. + (add-after 'remove-deps 'patch-source + (lambda* (#:key inputs #:allow-other-keys) (substitute* "CMakeLists.txt" - (("^\\s+add_subdirectory\\(3rdparty/googletest.*") "") - (("^(\\s+target_link_libraries.*)( gtest_main\\))" - _ prefix suffix) - (string-append prefix " gtest" suffix))) + ;; Use the system sanitizers-cmake module. + (("\\$\\{CMAKE_SOURCE_DIR\\}/3rdparty/sanitizers-cmake/cmake") + (string-append #$(this-package-native-input "sanitizers-cmake") + "/share/sanitizers-cmake/cmake")) + ;; Use the system googletest and corrosion modules + (("^\\s+add_subdirectory\\(3rdparty/googletest.*") + "") + (("^\\s+add_subdirectory\\(3rdparty/corrosion.*") + "") + ;; replace gtest_main by gtest + (("^(\\s+target_link_libraries.*)( gtest_main)" _ prefix suffix) + (string-append prefix " gtest"))) + ;; gui (substitute* "gui/CMakeLists.txt" - (("^\\s+../3rdparty/(qt)?imgui.*") "") - (("^(target_link_libraries.*)\\)" _ prefix) - (string-append prefix " imgui qt_imgui_widgets)"))))))) - (native-inputs - (list googletest sanitizers-cmake)) - (inputs - (list boost - eigen - icestorm - imgui-1.86 - pybind11 - python - qtbase-5 - qtwayland-5 - qtimgui - yosys)) - (build-system qt-build-system) - (arguments - (list - #:configure-flags - #~(list "-DARCH=ice40" - "-DBUILD_GUI=ON" - "-DBUILD_TESTS=ON" - (string-append "-DCURRENT_GIT_VERSION=" #$tag) - (string-append "-DICESTORM_INSTALL_PREFIX=" - #$(this-package-input "icestorm")) - "-DUSE_IPO=OFF") - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-source + (("\\$\\{CMAKE_SOURCE_DIR\\}(/3rdparty/imgui)") + (string-append #$(this-package-input "imgui") "/include/imgui")) + (("\\$\\{CMAKE_SOURCE_DIR\\}(/3rdparty/qtimgui)") + (string-append #$(this-package-input "qtimgui") "/include/qtimgui")) + (("^\\s+../3rdparty/(qt)?imgui.*") + ""))))))) + (native-inputs (list googletest sanitizers-cmake)) + (inputs (list boost + eigen + corrosion + imgui + pybind11 + python + qtbase-5 + qtwayland-5 + qtimgui)) + (synopsis "Place-and-Route tool for FPGAs") + (description "Nextpnr is a portable FPGA place and route tool.") + (home-page "https://github.com/YosysHQ/nextpnr/") + (license license:isc))) + +(define-public nextpnr-ice40 + (package + (inherit nextpnr) + (name "nextpnr-ice40") + (arguments + (substitute-keyword-arguments (package-arguments nextpnr) + ;; tests + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + ;; get icestorm/examples + (add-after 'compress-documentation 'get-icestorm (lambda* (#:key inputs #:allow-other-keys) - (substitute* "CMakeLists.txt" - ;; Use the system sanitizers-cmake module. - (("\\$\\{CMAKE_SOURCE_DIR\\}/3rdparty/sanitizers-cmake/cmake") - (string-append - #$(this-package-native-input "sanitizers-cmake") - "/share/sanitizers-cmake/cmake"))) - (substitute* "gui/CMakeLists.txt" - ;; Compile with system imgui and qtimgui headers. - (("^(target_include_directories.*)../3rdparty/imgui(.*)$" - _ prefix suffix) - (string-append prefix - (search-input-directory inputs - "include/imgui") - suffix)) - (("^(target_include_directories.*)../3rdparty/qtimgui/(.*)$" - _ prefix suffix) - (string-append prefix - (search-input-directory inputs - "include/qtimgui") - suffix)))))))) - (synopsis "Place-and-Route tool for FPGAs") - (description "Nextpnr aims to be a vendor neutral, timing driven, FOSS -FPGA place and route tool.") - (home-page "https://github.com/YosysHQ/nextpnr") - (license license:expat)))) + (copy-recursively + #$(origin (inherit (package-source icestorm))) + "icestorm"))) + ;; run all examples as tests + (add-after 'get-icestorm 'test + (lambda* _ + (let ((dir (opendir "icestorm/examples"))) + (do ((entry (readdir dir) + (readdir dir))) + ((eof-object? entry)) + (when (not (member entry '("." ".."))) + (setenv "PATH" + (string-append (string-append #$output "/bin") + ":" + (getenv "PATH"))) + (invoke "make" "-C" + (string-append "icestorm/examples/" entry)))) + (closedir dir)))))) + ((#:configure-flags original-flags #~(list)) + #~(append #$original-flags + `("-DARCH=ice40" + ,(string-append "-DICESTORM_INSTALL_PREFIX=" + #$(this-package-input "icestorm"))))))) + (propagated-inputs (modify-inputs (package-propagated-inputs nextpnr) + (prepend icestorm))) + ;; tests + (native-inputs (modify-inputs (package-native-inputs nextpnr) + (prepend yosys))))) (define-public gtkwave (package base-commit: 0b6d9901ec11c9365f9c77da21c2d0bf4e07c6d9 -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 01 11:24:26 2025 Received: (at 77330-done) by debbugs.gnu.org; 1 Apr 2025 15:24:26 +0000 Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzdTV-0006ls-FX for submit@debbugs.gnu.org; Tue, 01 Apr 2025 11:24:25 -0400 Received: from confino.investici.org ([2a11:7980:1::2:0]:31669) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzdTS-0006kz-S8; Tue, 01 Apr 2025 11:24:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1743521056; bh=OZ8UkoaMc4Ui6YgqXAFztyLnXI7IoITn4wOXrx77lHA=; h=From:To:Subject:In-Reply-To:Date:From; b=M/xuH18TFRi+64cag6DWF+RPT9ksODYeintYYwsxh0+XkoRjZ2hv//PEluCgRrdln MXjQOHT5xPvnBZ76Mg+FhQS++d8EX2C/0++znzaoDLdsa3BV+5h97FIMMFFkqTrtfG WfZadnNh0j2eN6np7bQ7yahxxR+MPDoW8QBRlKco= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4ZRsH46hY1z14sK; Tue, 1 Apr 2025 15:24:16 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4ZRsH45dt4z14st; Tue, 1 Apr 2025 15:24:16 +0000 (UTC) From: Cayetano Santos To: 77330-done@debbugs.gnu.org,77332-done@debbugs.gnu.org Subject: close patch In-Reply-To: <50db8630c9ee69345a7fe2be4da217932021365e.1743155290.git.csantosb@inventati.org> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Tue, 01 Apr 2025 17:24:15 +0200 Message-ID: <87frir7vmo.fsf@inventati.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 77330-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Wrong patch, see #77114. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCZ+wFHxccY3NhbnRvc2JA aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgkBzAQCMbctssERzJkbg/isbf7CFL5s0 ModKjEZRFNg+9/W9nAD6A36maFn71eQSRIoCDVB6RddrE7qFK++DNInVdIwKgg0= =5gUE -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 17 20:19:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 30 Apr 2025 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator