From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 13:51:19 2025 Received: (at submit) by debbugs.gnu.org; 3 May 2025 17:51:19 +0000 Received: from localhost ([127.0.0.1]:43187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBH1C-0004xs-Uo for submit@debbugs.gnu.org; Sat, 03 May 2025 13:51:19 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33382) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBH19-0004xX-NF for submit@debbugs.gnu.org; Sat, 03 May 2025 13:51:16 -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 1uBH13-0003IO-UI for guix-patches@gnu.org; Sat, 03 May 2025 13:51:09 -0400 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uBH10-0005p6-I3 for guix-patches@gnu.org; Sat, 03 May 2025 13:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746294653; bh=3VN796bC7SGhYuQe1m4pe6Pag0eh2ENrDhqGUIgTzC8=; h=From:To:Cc:Subject:Date:From; b=sZpwtjxVlrUDCjVheVKeD+NS1xs+9LMHDPQwETpUi0rWUE5zZdNASChAgG5JdtbhH x+S9iqEEtZeWoAaAvlYnPxS/PMgHJQvVFKkhOm6IezF+anbQ+b/JP8DEpKs+IAxQTI /b/lVK43thr+C3Hm2yRAmoMWtaHP+EhLs+rOlm4E= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Zqb1T4hkgz11Bh; Sat, 3 May 2025 17:50:53 +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 4Zqb1T1trvz11Bg; Sat, 3 May 2025 17:50:53 +0000 (UTC) From: Cayetano Santos To: guix-patches@gnu.org Subject: [PATCH 0/2 electronics-team] Upgrade nextpnr. Date: Sat, 3 May 2025 19:46:49 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=93.190.126.19; envelope-from=csantosb@inventati.org; helo=confino.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 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 (/) Hi, This patch series adds a new nextpnr package (strongly based on former nextpnt-ice40), common to all derived nextpnr-xxx, which will inherit from it. Other device packages will follow (nextpnr-ecp5, which uses prjtrellis as backend, for example). See [0] First commit - updates to 0.8 - updates substitutions in Makefiles Second commit modifies the device specific nextpnr-ice40, which now inherits from nextpnr, using icestorm as a backend. With respect to nextpnr: - adds icestorm as propagated input - adds yosys as native input, for tests - addapts config flags to ice40 architecture - uses tests from icestorm/examples [0] https://github.com/YosysHQ/nextpnr/blob/master/README.md Cayetano Santos (2): gnu: Add nextpnr. gnu: nextpnr-ice40: Update to 0.8. gnu/packages/fpga.scm | 216 +++++++++++++++++++++++------------------- 1 file changed, 119 insertions(+), 97 deletions(-) base-commit: fa1149d3fd8d2ce94968dd05d5dc08561cb283ed -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 14:19:50 2025 Received: (at 78233) by debbugs.gnu.org; 3 May 2025 18:19:50 +0000 Received: from localhost ([127.0.0.1]:43284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBHSn-0006OH-Vt for submit@debbugs.gnu.org; Sat, 03 May 2025 14:19:50 -0400 Received: from confino.investici.org ([93.190.126.19]:57231) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBHSi-0006Nr-B5 for 78233@debbugs.gnu.org; Sat, 03 May 2025 14:19:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746296382; bh=gwbZahh5Het4T8WbC5cR1SWi/nxytf+8jpWuVxoZBKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vxt3sjQJqmebEmUkv55qNUUbvl8CrnI8LmwiK6wAYyZUj0aPhStoWf9l3KjVMkxdb PkPq1k0x/FgMYZOcnjQ7mO7oaJsTBEY6/EW/geYLHdH3cAYrg+2nU0gc8v/zj26ch3 qDZS1hApxnIhqGra2c8VFN1DNdU3Tq1C/S3KP7qA= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Zqbfk231Sz11JG; Sat, 3 May 2025 18:19:42 +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 4Zqbfj6hT5z11JF; Sat, 3 May 2025 18:19:41 +0000 (UTC) From: Cayetano Santos To: 78233@debbugs.gnu.org Subject: [PATCH 1/2] gnu: Add nextpnr. Date: Sat, 3 May 2025 20:20:05 +0200 Message-ID: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: Cayetano Santos 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.7 (-) * gnu/packages/fpga.scm (nextpnr): New variable. Change-Id: Ic3476a6a4220ec20191897a6efb3d4aa347b51c2 --- gnu/packages/fpga.scm | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 2298dde595..9dbd1a4564 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -178,6 +178,84 @@ (define-public iverilog ;; You have to accept both GPL2 and LGPL2.1+. (license (list license:gpl2 license:lgpl2.1+)))) +(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)) + ;; Required to get oourafft, json11, python-console and + ;; QtPropertyBrowser, not packaged in Guix. + (recursive? #t))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + ;; Remove bundled source code for which Guix has packages. + '(with-directory-excursion "3rdparty" + (for-each delete-file-recursively + '("googletest" "imgui" "pybind11" "qtimgui" + "sanitizers-cmake" "corrosion")))) + (sha256 + (base32 "0p53a2gl89hf3hfwdxs6pykxyrk82j4lqpwd1fqia2y0c9r2gjlm")))) + (build-system qt-build-system) + (arguments + (list + #:cmake cmake ;CMake 3.25 or higher is required + #: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 references to unbundled code and link against external + ;; libraries instead. + (add-after 'unpack 'patch-source + (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")) + ;; Use the system googletest module + (("^\\s+add_subdirectory\\(3rdparty/googletest.*") + "") + ;; Use the system corrosion module + (("^\\s+add_subdirectory\\(3rdparty/corrosion.*") + "") + ;; replace gtest_main by gtest + (("^(\\s+target_link_libraries.*)( gtest_main)" _ prefix suffix) + (string-append prefix " gtest"))) + ;; Use the system imgui module + (substitute* "gui/CMakeLists.txt" + (("\\$\\{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 + corrosion + eigen + imgui + pybind11 + python + qtbase-5 + qtimgui + qtwayland-5)) + (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:asl2.0))) + (define-public yosys (package (name "yosys") -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 03 14:19:50 2025 Received: (at 78233) by debbugs.gnu.org; 3 May 2025 18:19:51 +0000 Received: from localhost ([127.0.0.1]:43286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBHSo-0006OO-E1 for submit@debbugs.gnu.org; Sat, 03 May 2025 14:19:50 -0400 Received: from confino.investici.org ([93.190.126.19]:58359) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uBHSl-0006Nx-HY for 78233@debbugs.gnu.org; Sat, 03 May 2025 14:19:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746296386; bh=qjZktaLzdtVMFPSF6H4+vxMk6DyP5e0H5vEuAlHhO90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T0MGxKZdvRTMjmyhoA/oDbfkKXN4Sz45gigAbsiqD07wewIU/5o1QUuTmIQPG8g2y 8xTqxELaeMSh1ck333aOBPcoagB13UPEq5vINwQUT5iCj3QL06G4fo01PdXkSYk4cd XWeTf5ILXnLthlFKX5w2EnZkKRO3xfSg2Lk4JFMM= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Zqbfp4VW4z11JR; Sat, 3 May 2025 18:19:46 +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 4Zqbfp23pqz11JF; Sat, 3 May 2025 18:19:46 +0000 (UTC) From: Cayetano Santos To: 78233@debbugs.gnu.org Subject: [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. Date: Sat, 3 May 2025 20:20:06 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: Cayetano Santos 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.7 (-) * gnu/packages/fpga.scm (nextpnr-ice40): Update to 0.8. Change-Id: I8d1c3528679f38ec4593f90aec0f1c4321dc7e44 --- gnu/packages/fpga.scm | 138 +++++++++++++----------------------------- 1 file changed, 41 insertions(+), 97 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 9dbd1a4564..e5c3313487 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -256,6 +256,47 @@ (define nextpnr (home-page "https://github.com/YosysHQ/nextpnr/") (license license:asl2.0))) +(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) + (copy-recursively + #$(origin (inherit (package-source icestorm))) + "icestorm"))) + ;; run all icestorm/examples as tests + (add-after 'get-icestorm 'tests-icestorm-examples + (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 yosys (package (name "yosys") @@ -434,103 +475,6 @@ (define-public icestorm files.") (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. - (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. - (substitute* "CMakeLists.txt" - (("^\\s+add_subdirectory\\(3rdparty/googletest.*") "") - (("^(\\s+target_link_libraries.*)( gtest_main\\))" - _ prefix suffix) - (string-append prefix " gtest" suffix))) - (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 - (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)))) - (define-public gtkwave (package (name "gtkwave") -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 07 09:29:51 2025 Received: (at 78233) by debbugs.gnu.org; 7 May 2025 13:29:51 +0000 Received: from localhost ([127.0.0.1]:42534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uCeqN-0002Z6-3R for submit@debbugs.gnu.org; Wed, 07 May 2025 09:29:51 -0400 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:56817) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uCeqJ-0002Ye-R4 for 78233@debbugs.gnu.org; Wed, 07 May 2025 09:29:48 -0400 Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA id 31CD21FF48; Wed, 7 May 2025 15:29:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erlikon.ch; s=20250312; t=1746624581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D3pwowppUvD3nc8PsMz/Nw/KgilN2eU58pmjUfacrCY=; b=UsMDOhfzD5AFYt+A8SR3fJvHDJjeY77FWBRa5BocU0DZAkXAqTwsqaHaDgJmf6pSqxk2RQ WGh3614hIFs2raFmb/ERnO2Uo3J8iw+ugw8NEgpjpdtQ2wOReyh0WIDqLCvxgQOBDw+EDE nf0n6Gx3i+BZhgtT4HFT/bI2tXGDJaxToXlBDZej2+eVBeMXwEYz8MP9pvYznc59nkoyC6 bEKmsnov1dj4bWc3aV3hsFFYlwLn1xdaY32Hl8tgW5PsP06KiRb4vWf1uDQmLTwrwBJxQ0 9H71yScsuG7FdcJtBusOVgKLbt7/KJ8vws/INFGYLxvQvRaa65KaBya8xPJvvLhs7B3cGR AAXUyJrRaxh/F1PDv+7kB5lfSwdWjtCej1/zwyHfZ2VlhA2OX3eK9W7T8TqiGi8WmsQYmn cxg8X38JsXXSYg0mxAcoQr/EMMeNmLxzJq+t7ElRTrLkw1tDUQMLEvKQG89gKU5QaKG8IS Es6/KPzi5pyluTr+Rsh/WYtIUi6kBVMu/bJ48iqfDx8Q8P8bEI/ksrhqRP2/1ZPYOE4C9B SBovflQQG+IxpZuKcQw0sReAOHUJK6nxk6MeHPvNg+f2UXXrcUNryKvbfkyDg5MUVWawN7 UatJhIv2mf3399zMG5HKQAJ4ty9MCKib1iswUNuh6oZVtSPSb6780= Date: Wed, 7 May 2025 15:29:38 +0200 From: Gabriel Wicki To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 0/2 electronics-team] Upgrade nextpnr. Message-ID: <7txt3faw6qr2mplirxbmo2rsj5cvhgmg3tziwoannt4rsdqrjk@rhpp2c74bokm> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Maxim Cournoyer , Ekaitz Zarraga 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 (-) Hi! Thanks for the patch! It LGTM and I appreciate the initiative. Not sure if the diff looked somewhat more clear if the two commits were merged into one and the new definitions came to lay where the nextpnr-ice40 is currently. From debbugs-submit-bounces@debbugs.gnu.org Thu May 08 08:43:28 2025 Received: (at 78233) by debbugs.gnu.org; 8 May 2025 12:43:28 +0000 Received: from localhost ([127.0.0.1]:55231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uD0b1-0000kn-Ak for submit@debbugs.gnu.org; Thu, 08 May 2025 08:43:27 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:47162) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uD0ax-0000kU-Ld for 78233@debbugs.gnu.org; Thu, 08 May 2025 08:43:24 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-22fa28c761dso4962125ad.2 for <78233@debbugs.gnu.org>; Thu, 08 May 2025 05:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746708197; x=1747312997; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=sFWYJkfC5S8Xb/vmDqCMsIA475Z+hm4x8Pm+4veHhjc=; b=H2vNJi9WjRUC/XVe9A1/v8/E4N+PRkapSeKz/BXpfPAbVxnZlhG4LYTMA4jTDxD1Kc yr7JiFjQb9t4hqrP/yPkJH3S+zYX3sJhO3kLtZ2TZCvPEHrIjUNTuXBOtHjUYNY+becu W6x/CU0pb1N+2VlYE8qd3WlvXBvao1NA8hwZ0KYrGYPmj6npqznPcyuTBBVAo86ySLTi Rzg+qWp7MQDSEoZVeGzru00AO2vMMyn29/8rqE2eZerhKwWAYpA8XSfrw0PU0Su3RK9d yfzN6TIbnPuiF/M7ejr6yJ8cPz7IeswCDJMlvQtfzEviVhSp6ayla4VFKH90rb0yvmFD wpYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746708197; x=1747312997; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sFWYJkfC5S8Xb/vmDqCMsIA475Z+hm4x8Pm+4veHhjc=; b=eVVzrBiJU1m97R6jG1oaWdJ9TsPrbt9JU3xLpFO6/fJptmfiTydCz6nu5VrNNXPiDC xlV6vOz54iigR83D+vo9p2wa78XTModGFgQ9rKi/45IOlWqOlmJ9zAD4PIRDSx9HnnoZ IW/ta7MHjHsA7mzdzwl1/l1R38bS26J8QYGA1PHEB7aw35XTzafurjC5zA3deVSLqMyf uj8/5f8XddJ/CvNhAJ1rOeYLj9MERZBo8zEivdrTqQfwa1SW48AdejY8sMFPqtHs++7E qQmgwuny2CiLMErjGZvGFV4Iv0g95sDQjHQzcuBixO/ng6Zm7ZS7U2HsoTpB53Y9a5U7 qNng== X-Gm-Message-State: AOJu0Yxx9QawlXmRoi9x9ya+rIOIs6DvapBIb1IztV+jd1dj10Jufd1j gHfihwH3xL20NtEqEUU6VZTTx+9fnHhfcQ7gbb9GjQm6jK5wNvx0 X-Gm-Gg: ASbGnctSS7dy6KThPSGNXZr9Ht0kRPbnP62ZauKOYTB0L757FfW+ZnfxFVmirx/nkHs xCJQh/dokuSnaUkG7m/zbTsEZi8B2r1wOiJPq3E3llJWodN+Llxu6gyPQdDbydSonKMMnsCwYwa CAyQWRF9uKmS5ccYDD5ZmoUTkZTJftAww20+wMODGNcpbjN1b7U9RZ7aXgCMYwf/5Ve+6TPejqT t/pGG4FN3+vjGcNqK6zxaK5UQhxw2DrDFxwg3B0bMKzi45Jahqsc5lN+jEA49rP1mVBtsaA5Dps ULATlSGWPicWHfz9U6LGB2RBZSiH+THbATOIH4s= X-Google-Smtp-Source: AGHT+IFTOE4a53HtImF8dmThgkP7lt2uQhBP5khltera+v6vaJOWgcuqth/BU5YXfhOWW7tQF75U7w== X-Received: by 2002:a17:903:2381:b0:22f:b716:c39d with SMTP id d9443c01a7336-22fb716c3dcmr14308095ad.33.1746708197233; Thu, 08 May 2025 05:43:17 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e50d8d78bsm43273075ad.89.2025.05.08.05.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 May 2025 05:43:16 -0700 (PDT) From: Maxim Cournoyer To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 1/2] gnu: Add nextpnr. In-Reply-To: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> (Cayetano Santos's message of "Sat, 3 May 2025 20:20:05 +0200") References: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> Date: Thu, 08 May 2025 21:43:13 +0900 Message-ID: <87selfuvby.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) Hi! Cayetano Santos writes: > * gnu/packages/fpga.scm (nextpnr): New variable. > > Change-Id: Ic3476a6a4220ec20191897a6efb3d4aa347b51c2 > --- > gnu/packages/fpga.scm | 78 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 78 insertions(+) > > diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm > index 2298dde595..9dbd1a4564 100644 > --- a/gnu/packages/fpga.scm > +++ b/gnu/packages/fpga.scm > @@ -178,6 +178,84 @@ (define-public iverilog > ;; You have to accept both GPL2 and LGPL2.1+. > (license (list license:gpl2 license:lgpl2.1+)))) > > +(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)) > + ;; Required to get oourafft, json11, python-console and > + ;; QtPropertyBrowser, not packaged in Guix. > + (recursive? #t))) I'd add a ';; TODO: Package the missing oourafft, json11, etc.' dependencies.', so that people looking for things to do in the source can find them. > + (file-name (git-file-name name version)) > + (modules '((guix build utils))) > + (snippet > + ;; Remove bundled source code for which Guix has packages. > + '(with-directory-excursion "3rdparty" > + (for-each delete-file-recursively > + '("googletest" "imgui" "pybind11" "qtimgui" > + "sanitizers-cmake" "corrosion")))) Great. Perhaps not necessary here, but I've used defensive techniques in the past to allow newer release to slip new dependencies unknown to the packager, e.g. in retroarch-minimal: --8<---------------cut here---------------start------------->8--- (snippet #~(begin (use-modules (guix build utils) (ice-9 ftw) (srfi srfi-26)) ;; XXX: 'delete-all-but' is copied from the turbovnc package. (define (delete-all-but directory . preserve) (define (directory? x) (and=> (stat x #f) (compose (cut eq? 'directory <>) stat:type))) (with-directory-excursion directory (let* ((pred (negate (cut member <> (append '("." "..") preserve)))) (items (scandir "." pred))) (for-each (lambda (item) (if (directory? item) (delete-file-recursively item) (delete-file item))) items)))) ;; Remove as much bundled sources as possible, shaving off about ;; 65 MiB. (delete-all-but "deps" "feralgamemode" ;used in platform_unix.c "mbedtls" ;further refined below "yxml") ;used in rxml.c ;; This is an old root certificate used in net_socket_ssl_mbed.c, ;; not actually from mbedtls. (delete-all-but "deps/mbedtls" "cacert.h"))) --8<---------------cut here---------------end--------------->8--- > + (sha256 > + (base32 "0p53a2gl89hf3hfwdxs6pykxyrk82j4lqpwd1fqia2y0c9r2gjlm")))) > + (build-system qt-build-system) > + (arguments > + (list > + #:cmake cmake ;CMake 3.25 or higher is required There's also cmake-next, which would be easier to grep, perhaps, when the time comes to sed the repo after a core upgrade of cmake-minimal. > + #:configure-flags > + #~(list "-DBUILD_GUI=OFF" Why do we not build the GUI? We already have the Qt dependencies, it seems. > + "-DUSE_OPENMP=yes" > + "-DBUILD_TESTS=ON" > + (string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version) > + "-DUSE_IPO=OFF") > + #:phases > + #~(modify-phases %standard-phases > + ;; Remove references to unbundled code and link against external > + ;; libraries instead. > + (add-after 'unpack 'patch-source > + (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")) > + ;; Use the system googletest module > + (("^\\s+add_subdirectory\\(3rdparty/googletest.*") > + "") > + ;; Use the system corrosion module > + (("^\\s+add_subdirectory\\(3rdparty/corrosion.*") > + "") > + ;; replace gtest_main by gtest > + (("^(\\s+target_link_libraries.*)( gtest_main)" _ prefix suffix) > + (string-append prefix " gtest"))) > + ;; Use the system imgui module > + (substitute* "gui/CMakeLists.txt" > + (("\\$\\{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.*") > + ""))))))) Well done! If the source changes often, a patch could be more maintainable; ideally in way that can be forwarded upstream too, with good chances of being merged. That's less work for us in the long term. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu May 08 09:07:33 2025 Received: (at 78233) by debbugs.gnu.org; 8 May 2025 13:07:33 +0000 Received: from localhost ([127.0.0.1]:55622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uD0yK-0002X0-UQ for submit@debbugs.gnu.org; Thu, 08 May 2025 09:07:33 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:53650) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uD0yH-0002WR-0s for 78233@debbugs.gnu.org; Thu, 08 May 2025 09:07:29 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-22e7eff58a0so9197885ad.3 for <78233@debbugs.gnu.org>; Thu, 08 May 2025 06:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746709643; x=1747314443; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=iVhxdXafHHkbAHUHMV9Ux8kZdjdKBzcm09nNB8JdF3k=; b=X12SVZrCjV9qPywRVOmoxb33jjLPh6jrWZUc1kjOmMwT3iqfbYis8cpZrJGmgPEqSR 1Y72rTntA7F8VAadZpzCP1EvVT5Aqrr6yPDrFwIGvuRQ8vIZFDw2Lrs1ETFxKX8CGk0l 8aGRHpk4oMMc2tGtjlAvrkEBwaU0ve/XqkZ99w6OCf1ihOWug4osS9R1l1XygE0shPrg bf24qXGzdxZVGpI1EMeT+NtK04Ktr94BzJovokZaEO1AjKc5UWbu3it/kIlagRdT6Mp1 FKgQHggRD3TUm1tY6sE8NeQCmh5MZ1vPFIrGeJW5fFLMo08BAsYz7Tnps3huqTW2TIgn 1ryg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746709643; x=1747314443; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iVhxdXafHHkbAHUHMV9Ux8kZdjdKBzcm09nNB8JdF3k=; b=ojrpyrmccsQnS0H304ZXJtvvpj4lIjPdkHiRmcdwSDFsEo8+56jzXAF5rV/dhqK9Wr gqZ+l/LHiLCbMPyUrGL+IlAo87v/+yM/Y3IvLhNYUiADyYXlmcNkl8KWA/GgTfu8U0Al Wzzg1DvjtjZ5Sd0x9Gf47s4xqBpSgAggx7KZ9fuVUgwjxw+ORpazY8X2IKpU3c9f8Xwg SwZacnadXvp1kaB11I7G/XdS4l/HUPswIbfc+mkd0XnpZWV0Kk5D9qspSQi96Y7ZafSd 09R62UkMBZn6ubcGe6B0Z+CTdaXzudWpsI73LgQV28JHDwG2kjer/puc2qtvAmWnOF16 YJjA== X-Gm-Message-State: AOJu0Yz1CyOKq/jkbhIucot4LFUkeKLkvoo4F6fL2leZsL5RFGHNK7Ft K7HjIhi4qmEGge9l317VLJ7wn4e1CsQf3MbBptaYkvAAHz+H1exI X-Gm-Gg: ASbGnct/JEj6eL93DYFbZPfMwG1w1GR7YL9Qo6vEtrfzITI1yNmHcax6aKSFdnzPBwL 8wT+ZYr5O17ROK1QFFrEyzksOoU98XxBik5YGdmbl+geftdJCvtkWj4yMnVqORbuqbRGeGvtHW4 rZSdF4zdJdrBMmbb8RoBxpHnApsVw7ejdEu90UdcLn+hqnXPrufrynLLvgA+dLG8QqKzz0rLcjJ +ftUdcBRZovIa+KxGfbR2PaIgjOiSPlJY1mqj9YYwZwxCRqaowc1ledUU4nJaSCWrK/UKbXn6k4 iJm1iEnzb6EuFx/q9gH5rlk2zEqsDFWZN9WbxQA= X-Google-Smtp-Source: AGHT+IEB4ugGN2rNzgKf0N3lKd/8maqnZSNBTf9Gz1ipsTkOj85gRCcN8dnSVCXKTw+XnhyjQxIDPg== X-Received: by 2002:a17:903:2b04:b0:223:faf5:c82 with SMTP id d9443c01a7336-22e798b8be6mr56260695ad.8.1746709635903; Thu, 08 May 2025 06:07:15 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e150eb6d1sm111544355ad.49.2025.05.08.06.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 May 2025 06:07:15 -0700 (PDT) From: Maxim Cournoyer To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. In-Reply-To: (Cayetano Santos's message of "Sat, 3 May 2025 20:20:06 +0200") References: Date: Thu, 08 May 2025 22:07:12 +0900 Message-ID: <87o6w3uu7z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) Hi, Cayetano Santos writes: > * gnu/packages/fpga.scm (nextpnr-ice40): Update to 0.8. [...] > +(define-public nextpnr-ice40 > + (package > + (inherit nextpnr) > + (name "nextpnr-ice40") > + (arguments > + (substitute-keyword-arguments (package-arguments nextpnr) > + ;; tests I'd drop this comment. It's not a complete sentence, and doesn't help. > + ((#:phases phases #~%standard-phases) > + #~(modify-phases #$phases > + ;; get icestorm/examples > + (add-after 'compress-documentation 'get-icestorm I'd drop the comment and rename the phase to 'copy-icestorm-source > + (lambda* (#:key inputs #:allow-other-keys) > + (copy-recursively > + #$(origin (inherit (package-source icestorm))) You can drop the origin + inherit; package-source returns an origin too. > + "icestorm"))) The `inputs' keyword is not used. The lambda signature can be just (lambda _ ...) Why order after compress-documentation? Typically if something needs to be patched or copied, I do so after the `unpack' phase. > + ;; run all icestorm/examples as tests > + (add-after 'get-icestorm 'tests-icestorm-examples I'd drop the above comment and rename the phase to 'build-icestorm-examples > + (lambda* _ s/lambda*/lambda > + (let ((dir (opendir "icestorm/examples"))) > + (do ((entry (readdir dir) > + (readdir dir))) > + ((eof-object? entry)) > + (when (not (member entry '("." ".."))) Anytime you see (when (not ...)), turn it into (unless ...). > + (setenv "PATH" > + (string-append (string-append #$output "/bin") No need to nest 'string-append'; the first one alone suffices. > + ":" > + (getenv "PATH"))) > + (invoke "make" "-C" > + (string-append "icestorm/examples/" entry)))) > + (closedir dir)))))) Interesting, I had never seen the opendir/closedir approach, perhaps because the code base in Guix embraces functional rather than imperative style. It'd be more conventional (in Guix at least) to use (ice-9 ftw)'s scandir to list the files and apply for-each to its value, and I think it'd be more succinct too. Something like: (with-directory-excursion "icestorm/examples" (for-each (cut invoke "make" "-C" <>) (scandir "." (negate (cut member <> '("." "..")))))) You'll need to import the the (srfi srfi-26) module (for 'cut') and (ice-9 ftw) (for 'scandir'). > + ((#: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))) It's just a styling nitpick, but I like to format this like: (propagated-inputs (modify-inputs (package-propagated-inputs nextpnr) (prepend icestorm)) I find that it mixes better with the often-found: (propagated-inputs (list one two three ...)) forms. > + ;; tests Stray comment? > + (native-inputs (modify-inputs (package-native-inputs nextpnr) > + (prepend yosys))))) > + > (define-public yosys > (package > (name "yosys") > @@ -434,103 +475,6 @@ (define-public icestorm > files.") > (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. > - (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. > - (substitute* "CMakeLists.txt" > - (("^\\s+add_subdirectory\\(3rdparty/googletest.*") "") > - (("^(\\s+target_link_libraries.*)( gtest_main\\))" > - _ prefix suffix) > - (string-append prefix " gtest" suffix))) > - (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 > - (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)))) Hm, this relocation in the same diff as the changes muddled the scope. I thought it was a new entry above, so reviewed it as such. Could you please split the relocation as a prior commit with your actual changes to review in a 2nd commit on top? This should give a nicer view, as Gabriel also noted. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Fri May 09 14:33:29 2025 Received: (at 78233) by debbugs.gnu.org; 9 May 2025 18:33:29 +0000 Received: from localhost ([127.0.0.1]:39665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDSXI-0002gu-LV for submit@debbugs.gnu.org; Fri, 09 May 2025 14:33:29 -0400 Received: from latitanza.investici.org ([82.94.249.234]:40973) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDSXF-0002gh-PA for 78233@debbugs.gnu.org; Fri, 09 May 2025 14:33:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746815604; bh=pB28SjUmB6eCmn14+tNqx+AtIVefqgnb1crH8vElYok=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WEaXtp5fiKJs0EhF/CAkqvJ6rhJIiOo3bPq8cNXR4IBkNA4J1yNPUAUg1RD9lwy/j OanLEcjCcztgUCt573NTpCgoJNtTtXcVTyyzxxD9oMqwOpLc8u2DoQrt7JJfN8m9UP 11XGsYD1tSuNq6VgC4Fa46Vsobk9iMZzTaaGba+w= Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4ZvHgm0QfBzGpB9; Fri, 9 May 2025 18:33:24 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4ZvHgl3mb7zGpB8; Fri, 9 May 2025 18:33:23 +0000 (UTC) From: Cayetano Santos To: Maxim Cournoyer Subject: Re: [bug#78233] [PATCH 1/2] gnu: Add nextpnr. In-Reply-To: <87selfuvby.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 08 May 2025 21:43:13 +0900") References: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> <87selfuvby.fsf@gmail.com> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Fri, 09 May 2025 20:33:21 +0200 Message-ID: <87y0v5tz0u.fsf@inventati.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >jeu. 08 mai 2025 at 21:43, Maxim Cournoyer wro= te: > Why do we not build the GUI? We already have the Qt dependencies, it > seems. Simply, I=E2=80=99m unable to compile 0.8 with the gui flag on. To me, the priority now is providing in Guix a place and route workflow for all available nextpnr backends in cli mode, which is what most engineers use. In a second time, we will investigate how to build the gui and how activate other interesting options, but I=E2=80=99d rather pref= er this point not to be a big stopper to what really matters. > Well done! If the source changes often, a patch could be more > maintainable; ideally in way that can be forwarded upstream too, with > good chances of being merged. That's less work for us in the long term. Generally speaking, I see what you mean. In this very case, I don=E2=80=99t understand how to replace current invocations to inputs (this-package-input) with a patch; neither I see how upstream might consider a patch to Guix only requirements, specially, as there is no support to compilations not using the 3rd party modules they provide. C. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCaB5KcRccY3NhbnRvc2JA aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgp98AQClYKP+NbysVPkNy9AMU97IJOPD qENmEN4DGHOHEbmm3AEAj5BiiLe4uVxZpZoqiavlsg2Ypgs/Ysn8HvZn9aJTyQc= =a0sV -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 09 14:51:46 2025 Received: (at 78233) by debbugs.gnu.org; 9 May 2025 18:51:46 +0000 Received: from localhost ([127.0.0.1]:39778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDSp0-0003pR-2W for submit@debbugs.gnu.org; Fri, 09 May 2025 14:51:46 -0400 Received: from confino.investici.org ([2a11:7980:1::2:0]:61375) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDSow-0003p9-Bk for 78233@debbugs.gnu.org; Fri, 09 May 2025 14:51:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746816698; bh=LlVgVhr0JOJoRyk0E22zS6GJaDg7glZLl1cXjL/eFwo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Sb7RfLhcryoP5wytBGoTBixQIXGTli8cht2lrrOJQoVo55xWnrH/MGsPxptdoq6wq N6rp4jgTQQDvsgtO63eF4RA5PPitPJ2B4J4LDjd9eOmbsPYSMdOYESWJBJWAjdQwJF EopwYOtC7r/MItrqrHCuA5YVVvDfqEKHNroshlRQ= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4ZvJ4p3TvPz11jK; Fri, 9 May 2025 18:51:38 +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 4ZvJ4n43FLz11dn; Fri, 9 May 2025 18:51:37 +0000 (UTC) From: Cayetano Santos To: Maxim Cournoyer Subject: Re: [bug#78233] [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. In-Reply-To: <87o6w3uu7z.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 08 May 2025 22:07:12 +0900") References: <87o6w3uu7z.fsf@gmail.com> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Fri, 09 May 2025 20:51:36 +0200 Message-ID: <87frhdsjlz.fsf@inventati.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) n<#secure method=3Dpgpmime mode=3Dsign> Hi Maxim, Thanks for all your comments ! They=E2=80=99re (almost) included in v2 ser= ies. >jeu. 08 mai 2025 at 22:07, Maxim Cournoyer wro= te: > Interesting, I had never seen the opendir/closedir approach, perhaps > because the code base in Guix embraces functional rather than imperative > style. It'd be more conventional (in Guix at least) to use (ice-9 > ftw)'s scandir to list the files and apply for-each to its value, and I > think it'd be more succinct too. > > Something like: > > (with-directory-excursion "icestorm/examples" > (for-each (cut invoke "make" "-C" <>) > (scandir "." > (negate (cut member <> '("." ".= .")))))) I just learned about cut existence, thanks again; I understand its utility by looking at examples all around the code. No doubt, this is the correct alternative. Unfortunately, I=E2=80=99m unable at this point to use it, I miss the neces= sary skills: I fall in frequent "unbound variable <>" errors that I don=E2=80=99t known yet how to handle, I suspect gexps add a extra layer of complexity which becomes a barrier to me, sorry for that. > Hm, this relocation in the same diff as the changes muddled the scope. > I thought it was a new entry above, so reviewed it as such. Could you > please split the relocation as a prior commit with your actual changes > to review in a 2nd commit on top? This should give a nicer view, as > Gabriel also noted. Let=E2=80=99s forget the relocation by now, as it complicates things with no real utility by itself. We will sort things out later on. Just consider that, in reality, nextpnr replaces former nextpnr-ice40 (it is strongly based on it); new nextpnr-ice40 is a new package (even if it carries the name of previous one). This is not evident with two comm= its. Two commits, without breaking things up, are necessarily somehow confusing (and kind of useless, to that matter). To me, the only means of achieving a nicer diff view is using a single commit, where one may compare new nextpnr with old nextpnr-ice40, at the same time as it becomes evident that the new nextpnr-ice40 is an addition. V2 is in its way. C. From debbugs-submit-bounces@debbugs.gnu.org Sun May 11 05:20:29 2025 Received: (at 78233) by debbugs.gnu.org; 11 May 2025 09:20:29 +0000 Received: from localhost ([127.0.0.1]:58077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uE2rF-0004Ja-7Q for submit@debbugs.gnu.org; Sun, 11 May 2025 05:20:29 -0400 Received: from confino.investici.org ([93.190.126.19]:45033) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uE2rC-0004JN-7U for 78233@debbugs.gnu.org; Sun, 11 May 2025 05:20:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746955224; bh=yxX1xP0zAf9grP4ON3CaKIhurylx5j70LsiJcwOb0/I=; h=From:To:Cc:Subject:Date:From; b=THLlVMwyBPKwxxwtCy4V8Df+AZ1wTdzBPdp/ATPAoSq2uPNrS9Lta2rA9PuV4G+er lVI9ruRX7LYZNBYaplEnMP24eCa71KGGL6jTWG5xSA4qxLVdtM+Yi10gIwQOUl88hj /1rb6z3tyH6M2zreIJ/Xx4xm1eYHyMBND5JfgewE= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4ZwHJm4DdXz11Q5; Sun, 11 May 2025 09:20:24 +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 4ZwHJm1hVvz11PY; Sun, 11 May 2025 09:20:23 +0000 (UTC) From: Cayetano Santos To: 78233@debbugs.gnu.org Subject: [PATCH v2 1/2] gnu: Add nextpnr. Date: Sun, 11 May 2025 11:18:38 +0200 Message-ID: <6ea46fd8ccc0a8aa56e03a9e2f320ac3de37c7a4.1746955119.git.csantosb@inventati.org> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: Cayetano Santos 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.7 (-) * gnu/packages/fpga.scm (nextpnt): New variable. Change-Id: Ic3476a6a4220ec20191897a6efb3d4aa347b51c2 --- gnu/packages/fpga.scm | 79 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 2298dde595..083faf7d7a 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -356,6 +356,85 @@ (define-public icestorm files.") (license license:isc)))) +(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)) + ;; TODO: Package next packages, not yet in Guix. + ;; Required to get missing oourafft, json11, python-console and + ;; QtPropertyBrowser. + (recursive? #t))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + ;; Remove bundled source code for which Guix has packages. + '(with-directory-excursion "3rdparty" + (for-each delete-file-recursively + '("googletest" "imgui" "pybind11" "qtimgui" + "sanitizers-cmake" "corrosion")))) + (sha256 + (base32 "0p53a2gl89hf3hfwdxs6pykxyrk82j4lqpwd1fqia2y0c9r2gjlm")))) + (build-system qt-build-system) + (arguments + (list + #:cmake cmake-next ;CMake 3.25 or higher is required. + #: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 references to unbundled code and link against external + ;; libraries instead. + (add-after 'unpack 'patch-source + (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")) + ;; Use the system googletest module + (("^\\s+add_subdirectory\\(3rdparty/googletest.*") + "") + ;; Use the system corrosion module + (("^\\s+add_subdirectory\\(3rdparty/corrosion.*") + "") + ;; replace gtest_main by gtest + (("^(\\s+target_link_libraries.*)( gtest_main)" _ prefix suffix) + (string-append prefix " gtest"))) + ;; Use the system imgui module + (substitute* "gui/CMakeLists.txt" + (("\\$\\{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 + corrosion + eigen + imgui + pybind11 + python + qtbase-5 + qtimgui + qtwayland-5)) + (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:asl2.0))) + (define-public nextpnr-ice40 (let* ((version "0.7") (tag (string-append "nextpnr-" version))) base-commit: 4fe484ee7e9d598a9d0a249c375b75a14b95d1b4 -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 11 05:20:32 2025 Received: (at 78233) by debbugs.gnu.org; 11 May 2025 09:20:32 +0000 Received: from localhost ([127.0.0.1]:58080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uE2rH-0004Jo-MB for submit@debbugs.gnu.org; Sun, 11 May 2025 05:20:32 -0400 Received: from confino.investici.org ([93.190.126.19]:30847) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uE2rF-0004JX-Ew for 78233@debbugs.gnu.org; Sun, 11 May 2025 05:20:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746955228; bh=7i33XPxo1BSff/AR9GDet9NvjGZhoAgEyif7pIkL/ms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t4KzCzXnse7dfq+1Xqfq1H7A2oNC9iGEgsJvw65R79bfKdFF4kleEpU/rOvlHOCij Yvl6yXud/Ah/oIRsSPuOorJvT1pqfICGlpBUPqUYiddvdDrGPyKT+QcjnBXoW+C4MK jrSAQqTl3q1vwF4bVFVV4ilFL4Xka7Q45fXoypu8= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4ZwHJr1wmgz11Q5; Sun, 11 May 2025 09:20:28 +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 4ZwHJq6htnz11PY; Sun, 11 May 2025 09:20:27 +0000 (UTC) From: Cayetano Santos To: 78233@debbugs.gnu.org Subject: [PATCH v2 2/2] gnu: nextpnr-ice40: Update to 0.8. Date: Sun, 11 May 2025 11:18:39 +0200 Message-ID: <1234a8a37bb488c334705c54c30dd9732c9de634.1746955119.git.csantosb@inventati.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <6ea46fd8ccc0a8aa56e03a9e2f320ac3de37c7a4.1746955119.git.csantosb@inventati.org> References: <6ea46fd8ccc0a8aa56e03a9e2f320ac3de37c7a4.1746955119.git.csantosb@inventati.org> MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: Cayetano Santos 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.7 (-) * gnu/packages/fpga.scm (nextpnr-ice40): Update to 0.8. Change-Id: I8d1c3528679f38ec4593f90aec0f1c4321dc7e44 --- gnu/packages/fpga.scm | 128 +++++++++++------------------------------- 1 file changed, 33 insertions(+), 95 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 083faf7d7a..77f39559cf 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -436,102 +436,39 @@ (define nextpnr (license license:asl2.0))) (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. - (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. - (substitute* "CMakeLists.txt" - (("^\\s+add_subdirectory\\(3rdparty/googletest.*") "") - (("^(\\s+target_link_libraries.*)( gtest_main\\))" - _ prefix suffix) - (string-append prefix " gtest" suffix))) - (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 - (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)))) + (package + (inherit nextpnr) + (name "nextpnr-ice40") + (arguments + (substitute-keyword-arguments (package-arguments nextpnr) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'get-icestorm + (lambda _ + (copy-recursively #$(package-source icestorm) "icestorm"))) + ;; Run examples included in icestorm backend. + (add-after 'compress-documentation 'run-icestorm-examples + (lambda _ + (let* ((examples "../source/icestorm/examples/") + (dir (opendir examples)) + (path-env (getenv "PATH"))) + (setenv "PATH" (string-append #$output "/bin" ":" path-env)) + (do ((entry (readdir dir) (readdir dir))) + ((eof-object? entry)) + (unless (member entry '("." "..")) + (invoke "make" "-C" (string-append 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))) + (native-inputs + (modify-inputs (package-native-inputs nextpnr) + (prepend yosys))))) (define-public gtkwave (package -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 11 09:14:55 2025 Received: (at 78233) by debbugs.gnu.org; 11 May 2025 13:14:55 +0000 Received: from localhost ([127.0.0.1]:32895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uE6W7-00024t-92 for submit@debbugs.gnu.org; Sun, 11 May 2025 09:14:55 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:54642) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uE6W4-00024c-Ub for 78233@debbugs.gnu.org; Sun, 11 May 2025 09:14:53 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7424c24f88bso1593111b3a.1 for <78233@debbugs.gnu.org>; Sun, 11 May 2025 06:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746969287; x=1747574087; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CCj2Q+qrOqQzbdT0Fep+I9GozwLn127eRYpO740oYcg=; b=Om/4PgwKO7slyz/9gd7Dyud/QvYeoe8ElNPKOrP5yBh0PKzJ26+pZ6kwGVCDqtKQKQ BiGq1EM+f+zINMuXHPKIn8aIUbC6wNpigb3pGCwUYNMWElcRvaVaWePnJMrpazDH8VcJ vXm2QHqNszMEim+MIvuUaGLhUBHW2YutOqc+qZlx3odX07S6sCW3EFI75OkHBgp0dvOO wAPtaHZQoyqo+cubO4h72yFGft96cYKGnHDEosSZTe+rc52N7pSqSJI3n9mm89NcJPwA UGptJ8FRQaLliEeod3USdBkLx52f/V222veXFnZjDY4m2CS44C9irSOw0meuimDw79P2 FCCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746969287; x=1747574087; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CCj2Q+qrOqQzbdT0Fep+I9GozwLn127eRYpO740oYcg=; b=uuEMSng1l0d4cuoNUaQUl2tL0rJoEb8IEJiytZSg3mQkJ06UHUyKk3Zx+B7DMbF2i9 cqk1TdQKqw6VxvinhxXhgBVTUZqNGxKz1bXFVSsSLpHrE0fo7sd+4GD6ir41HrOb1oWy 5GKdmfrOoQv0OqH+iMLL9Eo1Xe6CzWZfUYHpxoCu+PXlpMsBTq79ucKOiVuclwYu4jMT e/Hmdrbl+ql+vkMxGDwLQc60U+P5LypVFzd4iOlMMI38iAEDWkLh+1sDH+013dP1H6sp 6+WAYhllrMuWpkQGNmc0RoqwWy8Nvf2HmEdQzyJWEpOgTCf1Cf7/eloRB69Im3yu+dmS +h+Q== X-Gm-Message-State: AOJu0YyNd/Q0eOFvzqPOzumGJQ6X06O2n3ZaHBmapSp1tebxxR33E91t 5v+5g2qS61OfL5TtafJZbSZoVOUeCdkIEjUPNJXAwxClwWySvJW0 X-Gm-Gg: ASbGncvapES2tdVZn3IFkGdKI4Ltu1ytLpCApGehA8kO++BEIY/1HLTEjp4acDTwzJb wsxHRnAf9tKdZ3RWdtFaQl2PyNttVex8+oL6EcFL0QCv4OdlZrr6SS6vMzwRGIc2WeTRXwu4AN+ pC+4hEPtQu+TsTzbIbHGVwzs7qudPrPmeD+Kt+194VCVhPoPsFTuqYYt6GQSsbuYtMgFYLd2ieG 8WbNWjrTggrxx1TQxfzVH5bSOPqGfahqW6vXe0VObb4aLPsbj3B0o2tAHor6Qo3QCbW76026h6U B2KGSpcKercpv+ee3JzKMjECnCtjS+TiJUkhwV2/hZhp7sHbYQ== X-Google-Smtp-Source: AGHT+IH2navJ7tEkbvDix2OWpV9jtKgHWvfwMO5Xjt2BT9YC3dxkf9/m3H/+XS5LN42571XnBRviJg== X-Received: by 2002:a05:6a21:c91:b0:1ee:ef0b:7bf7 with SMTP id adf61e73a8af0-215abb3b979mr13487063637.19.1746969286843; Sun, 11 May 2025 06:14:46 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b2350ddbb93sm4108089a12.61.2025.05.11.06.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 May 2025 06:14:46 -0700 (PDT) From: Maxim Cournoyer To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 1/2] gnu: Add nextpnr. In-Reply-To: <87y0v5tz0u.fsf@inventati.org> (Cayetano Santos's message of "Fri, 09 May 2025 20:33:21 +0200") References: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> <87selfuvby.fsf@gmail.com> <87y0v5tz0u.fsf@inventati.org> Date: Sun, 11 May 2025 22:14:43 +0900 Message-ID: <87plgfs30c.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) Hi, Cayetano Santos writes: >>jeu. 08 mai 2025 at 21:43, Maxim Cournoyer wr= ote: > >> Why do we not build the GUI? We already have the Qt dependencies, it >> seems. > > Simply, I=E2=80=99m unable to compile 0.8 with the gui flag on. > > To me, the priority now is providing in Guix a place and route workflow > for all available nextpnr backends in cli mode, which is what most > engineers use. In a second time, we will investigate how to build the > gui and how activate other interesting options, but I=E2=80=99d rather pr= efer > this point not to be a big stopper to what really matters. >> Well done! If the source changes often, a patch could be more >> maintainable; ideally in way that can be forwarded upstream too, with >> good chances of being merged. That's less work for us in the long term. I think my comments were w.r.t. to patching the build system to use system-provided libraries. Patching commands to use the Guix-specific file names should remain as they are as substitutions in phases. > Generally speaking, I see what you mean. In this very case, I don=E2=80= =99t > understand how to replace current invocations to inputs > (this-package-input) with a patch; neither I see how upstream might > consider a patch to Guix only requirements, specially, as there is no > support to compilations not using the 3rd party modules they provide. That would mean contributing newly authored CMake glue code that would make configuring using system-provided libraries possible. It's more work, but worth it in the long term. I agree this doesn't need to block the current submission. --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun May 11 13:31:52 2025 Received: (at 78233) by debbugs.gnu.org; 11 May 2025 17:31:52 +0000 Received: from localhost ([127.0.0.1]:40451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEAWm-0007dO-9d for submit@debbugs.gnu.org; Sun, 11 May 2025 13:31:52 -0400 Received: from confino.investici.org ([2a11:7980:1::2:0]:46961) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uEAWi-0007d9-QQ for 78233@debbugs.gnu.org; Sun, 11 May 2025 13:31:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746984705; bh=ULDtZgq7BTMynYh7AV0luwRuKrz38nhig1ZLfxIlTlE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=B4Sbt3kr6IMRe4RDAk0GtavZgnIvpnvpEKvgk13Ul70Ju/ozDNY06N5AADx+DV/iR MB3GGfMEwtmROI6VCUfRl7glRj95TP03GrTsxSEvJtpDenrYuZotLGIfEFI7fh/y5K jHw/j4UPhHN2d1caLBs57IdizzaD0+i1Ijc6/VwA= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4ZwVCj3dvpz11JS; Sun, 11 May 2025 17:31:45 +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 4ZwVCh6Qbgz11F3; Sun, 11 May 2025 17:31:44 +0000 (UTC) From: Cayetano Santos To: Maxim Cournoyer Subject: Re: [bug#78233] [PATCH 1/2] gnu: Add nextpnr. In-Reply-To: <87plgfs30c.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 11 May 2025 22:14:43 +0900") References: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> <87selfuvby.fsf@gmail.com> <87y0v5tz0u.fsf@inventati.org> <87plgfs30c.fsf@gmail.com> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Sun, 11 May 2025 19:31:42 +0200 Message-ID: <87jz6nqcjl.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: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable >dim. 11 mai 2025 at 22:14, Maxim Cournoyer wro= te: > Hi, > > Cayetano Santos writes: > >>>jeu. 08 mai 2025 at 21:43, Maxim Cournoyer w= rote: >> >>> Why do we not build the GUI? We already have the Qt dependencies, it >>> seems. >> >> Simply, I=E2=80=99m unable to compile 0.8 with the gui flag on. >> >> To me, the priority now is providing in Guix a place and route workflow >> for all available nextpnr backends in cli mode, which is what most >> engineers use. In a second time, we will investigate how to build the >> gui and how activate other interesting options, but I=E2=80=99d rather p= refer >> this point not to be a big stopper to what really matters. > >>> Well done! If the source changes often, a patch could be more >>> maintainable; ideally in way that can be forwarded upstream too, with >>> good chances of being merged. That's less work for us in the long term. > > I think my comments were w.r.t. to patching the build system to use > system-provided libraries. Patching commands to use the Guix-specific > file names should remain as they are as substitutions in phases. > >> Generally speaking, I see what you mean. In this very case, I don=E2=80= =99t >> understand how to replace current invocations to inputs >> (this-package-input) with a patch; neither I see how upstream might >> consider a patch to Guix only requirements, specially, as there is no >> support to compilations not using the 3rd party modules they provide. > > That would mean contributing newly authored CMake glue code that would > make configuring using system-provided libraries possible. It's more > work, but worth it in the long term. I agree this doesn't need to block > the current submission. Ok , I understand now. Upstream, they=E2=80=99re half way towards supporting system libraries, instead of built-in. I=E2=80=99ll send them a PR to consi= der the remaining libraries we need, so that next time we will simply this package. C. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCaCDe/hccY3NhbnRvc2JA aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgodxAP43EOhWB1MJbzQWaq6Aipw2E1nR 2zXJmM5sBIXSiad/oQEA+C1cP6MGMoSMtMA2xOjT+C8hGc+X0bKIT0Bo4JF/VQM= =smXi -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 11 14:21:35 2025 Received: (at 78233) by debbugs.gnu.org; 11 May 2025 18:21:35 +0000 Received: from localhost ([127.0.0.1]:41453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEBIt-0003VH-3q for submit@debbugs.gnu.org; Sun, 11 May 2025 14:21:35 -0400 Received: from devianza.investici.org ([2c0f:f930:0:4::108]:55505) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uEBIp-0003Uy-0r for 78233@debbugs.gnu.org; Sun, 11 May 2025 14:21:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746987687; bh=/zLEV/LPz8/UqaLuDoJnRqQGqdiFYKp+uYAe8kjK+Dg=; h=From:To:Cc:Subject:Date:From; b=YdGq4NKxN5tkwgJp+3zlQMVCdH1S3Oa+DHSjycsF9gxxdfz+6impAi2dPR9JZVVvk 4gMPbZPW1nJuRVQpKsXN3JC50spaq+ngeo7kXvWNEZ/dQq7GOtLkWqJLzGWlbW/W5i eTAyrqO8xpp/1E0npt8RdztVv2qIDNXFktxq9qes= Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4ZwWK35b5Wz6xcv; Sun, 11 May 2025 18:21:27 +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 4ZwWK334JYz6xcj; Sun, 11 May 2025 18:21:27 +0000 (UTC) From: Cayetano Santos To: 78233@debbugs.gnu.org Subject: [PATCH v3 1/2] gnu: Add nextpnr. Date: Sun, 11 May 2025 20:20:05 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: Cayetano Santos 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.7 (-) * gnu/packages/fpga.scm (nextpnr): New variable. Change-Id: Ic3476a6a4220ec20191897a6efb3d4aa347b51c2 --- gnu/packages/fpga.scm | 90 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 2298dde595..519807e847 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -356,6 +356,96 @@ (define-public icestorm files.") (license license:isc)))) +(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)) + ;; TODO: Package next packages, not yet in Guix. + ;; Required to get missing oourafft, json11, python-console and + ;; QtPropertyBrowser. + (recursive? #t))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + ;; Remove bundled source code for which Guix has packages. + '(with-directory-excursion "3rdparty" + (for-each delete-file-recursively + '("googletest" "imgui" "pybind11" "qtimgui" + "sanitizers-cmake" "corrosion")))) + (sha256 + (base32 "0p53a2gl89hf3hfwdxs6pykxyrk82j4lqpwd1fqia2y0c9r2gjlm")))) + (build-system qt-build-system) + (arguments + (list + #:cmake cmake-next ;CMake 3.25 or higher is required. + #:configure-flags + #~(list "-DBUILD_GUI=OFF" + "-DUSE_OPENMP=ON" + "-DBUILD_TESTS=ON" + (string-append "-DCURRENT_GIT_VERSION=nextpnr-" #$version) + "-DUSE_IPO=OFF") + #:phases + #~(modify-phases %standard-phases + ;; We need sources to build the gui. + (add-after 'unpack 'get-imgui-src + (lambda _ + (copy-recursively #$(package-source imgui-1.86) "imgui") + (copy-recursively #$(package-source qtimgui) "qtimgui"))) + ;; Remove references to unbundled code and link against external + ;; libraries instead. + (add-after 'get-imgui-src 'patch-source + (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")) + ;; Use the system googletest module + (("^\\s+add_subdirectory\\(3rdparty/googletest.*") + "") + (("\\$\\{CMAKE_SOURCE_DIR\\}/3rdparty/googletest/googletest/include") + (string-append #$(this-package-native-input "googletest") + "/include")) + ;; Use the system corrosion module + (("^\\s+add_subdirectory\\(3rdparty/corrosion.*") + "") + ;; replace gtest_main by gtest + (("^(\\s+target_link_libraries.*)( gtest_main)" _ prefix suffix) + (string-append prefix " gtest"))) + (substitute* "gui/CMakeLists.txt" + ;; Use the system imgui module. + (("\\$\\{CMAKE_SOURCE_DIR\\}(/3rdparty/imgui)") + (string-append #$(this-package-input "imgui") + "/include/imgui")) + (("^\\s+../3rdparty/imgui") + "../imgui") + ;; Use the system qtimgui module. + (("\\$\\{CMAKE_SOURCE_DIR\\}(/3rdparty/qtimgui)") + (string-append #$(this-package-input "qtimgui") + "/include/qtimgui")) + (("^\\s+../3rdparty/qtimgui") + "../qtimgui/src"))))))) + (native-inputs (list googletest sanitizers-cmake)) + (inputs (list boost + corrosion + eigen + imgui-1.86 ;qtimgui depends on 1.86. + pybind11 + python + qtbase-5 + qtimgui + qtwayland-5)) + (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:asl2.0))) + (define-public nextpnr-ice40 (let* ((version "0.7") (tag (string-append "nextpnr-" version))) base-commit: 300d29e69988caf23684f08effa51f621c7ec083 -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 11 14:21:42 2025 Received: (at 78233) by debbugs.gnu.org; 11 May 2025 18:21:43 +0000 Received: from localhost ([127.0.0.1]:41457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEBIx-0003Vu-7l for submit@debbugs.gnu.org; Sun, 11 May 2025 14:21:42 -0400 Received: from devianza.investici.org ([2c0f:f930:0:4::108]:28833) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uEBIo-0003V0-UX for 78233@debbugs.gnu.org; Sun, 11 May 2025 14:21:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1746987689; bh=UYjtpogI4LpFUlx1V5YwN29/QIhbKNnKwaM5dPHDiVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D02ObL85iaTkOEyzWeWzmvot/z/pmkmwqRTVgDuO0jGEYS0Q4zDj1dfUH6Wbg1fbL hOOdC1Nv+n0WH8rCx1Hv6ROWB9CM5RdDf1Ca4kkLfLrpYlYgvuowfAdOmbIUlXL0/y VF/d6BgCv1DyGBX6jtR/4zaOXloX59DreyUTy5FU= Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4ZwWK56STCz6xcs; Sun, 11 May 2025 18:21:29 +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 4ZwWK5499qz6xcj; Sun, 11 May 2025 18:21:29 +0000 (UTC) From: Cayetano Santos To: 78233@debbugs.gnu.org Subject: [PATCH v3 2/2] gnu: nextpnr-ice40: Update to 0.8. Date: Sun, 11 May 2025 20:20:06 +0200 Message-ID: <226885befb8187c848659e2a0c8c4fc9ca001d7b.1746987606.git.csantosb@inventati.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Cayetano Santos , Ekaitz Zarraga , Gabriel Wicki , Maxim Cournoyer Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233 Cc: Cayetano Santos 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.7 (-) * gnu/packages/fpga.scm (nextpnr-ice40): Update to 0.8. Change-Id: I8d1c3528679f38ec4593f90aec0f1c4321dc7e44 --- gnu/packages/fpga.scm | 128 +++++++++++------------------------------- 1 file changed, 33 insertions(+), 95 deletions(-) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 519807e847..4d05420d66 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -447,102 +447,39 @@ (define nextpnr (license license:asl2.0))) (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. - (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. - (substitute* "CMakeLists.txt" - (("^\\s+add_subdirectory\\(3rdparty/googletest.*") "") - (("^(\\s+target_link_libraries.*)( gtest_main\\))" - _ prefix suffix) - (string-append prefix " gtest" suffix))) - (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 - (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)))) + (package + (inherit nextpnr) + (name "nextpnr-ice40") + (arguments + (substitute-keyword-arguments (package-arguments nextpnr) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'get-icestorm + (lambda _ + (copy-recursively #$(package-source icestorm) "icestorm"))) + ;; Run examples included in icestorm backend. + (add-after 'compress-documentation 'run-icestorm-examples + (lambda _ + (let* ((examples "../source/icestorm/examples/") + (dir (opendir examples)) + (path-env (getenv "PATH"))) + (setenv "PATH" (string-append #$output "/bin" ":" path-env)) + (do ((entry (readdir dir) (readdir dir))) + ((eof-object? entry)) + (unless (member entry '("." "..")) + (invoke "make" "-C" (string-append 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))) + (native-inputs + (modify-inputs (package-native-inputs nextpnr) + (prepend yosys))))) (define-public gtkwave (package -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Mon May 12 03:01:12 2025 Received: (at 78233) by debbugs.gnu.org; 12 May 2025 07:01:12 +0000 Received: from localhost ([127.0.0.1]:49493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEN9z-00065R-V4 for submit@debbugs.gnu.org; Mon, 12 May 2025 03:01:12 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:59550) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uEN9u-00064f-AT for 78233@debbugs.gnu.org; Mon, 12 May 2025 03:01:08 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-73c17c770a7so4884561b3a.2 for <78233@debbugs.gnu.org>; Mon, 12 May 2025 00:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747033259; x=1747638059; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pNtLANsXUg0vIVc6C2hKznOz7bEs/Et39PVZQmp0kRQ=; b=P/7a4u/ktlatpV7yYzDJq3+jO49SYKjV2jQCMlzPkoEVU2DEjm9ziykgSFPhQMJKXj 9t3UGuWSw6rkL7nmF5Q/g1Fx0fbmnnalMYUcE0njSornJTEe7e/YfjgwV0D9n41vrz5Q 8uAXYskc0fk+BIE36osnMRNkO2rTIHpl9Th7QD3eZF+6aQRaDx20QPCHZqu8fiMedTzn JUenFEfXpPeDovjADedSJPQnS8wi0p4zdGydHBwkgOg2nrP3XwKl5QJPTOI67MpMiq9k KrY+khVm6PvoyOmeyxYlIFQtV2mvOkakmbcUciX0/l58NG+Y3eSdjjL8FyzN9hgYIs+K ApzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747033259; x=1747638059; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pNtLANsXUg0vIVc6C2hKznOz7bEs/Et39PVZQmp0kRQ=; b=lhhOUyUnhwjmK5blcoCYOQKgF99ilRtEE8e7TubzbUtle4wDv3a0bi9YYsA0xDLKgM lVFLiF9hYPMGYK9FlE90gDWtBCFM1Xicy2zeKfOcBmyZp7G/TRAWuWLhSP1WEEZDNqTL w9MyjABPYGTQIFNEYFqNYfGV9LqAg5CmYkhZeko9oSQhAFPo9WFm7wkSZKqsjA/rcxdB rGD5VlbeC4RNGnKZ3d1C277C9C8R6Ew/dQxMJr8ItryUwlbZk2wT+oA8d9ZMBb8aJmnm jz/6UmoLmepUUZ//L3X2nuNvqiLNKrgFwhsy9mrKpAyBKkJquk5tvs01oo6H9bpNrv8W V/sg== X-Gm-Message-State: AOJu0YxL6lkSgJVhjGDnTs9jubkz9P4LuaUfxUncCkZ1nINIQXyDjgbV b5vLzhOWrvMnvrtPq0z4oEj/QJkXOK2Ry2QE57ssGKQ6jOiTbNIR/70x8Q== X-Gm-Gg: ASbGncsJWYAOSo/udDj4m1N3k5rxf+wPjZk1/VOOtGqNCy2gChxjTwq6SKx1uKdZfI8 gallc7PcW2sFm3sL0lk0GjyGUir+41l6zzma1X+gZNRqSKSVxZ5OXNAL0jmzTNhaPBcELw5C3Gv TKyUG/OsKhkgWiBfdnLtGtbysYVflXnazJeU328S553liTvvUD09lfhCx7cYmB8X5RKh0fcBS7W vxV6axY4WVh02mgZdc9w6HdibHszJCJ52bNEM74MUWyVqzWWf3j923iubp8vsF9ZunuZszVfQN7 P/1N1srrh+mDjquRgZ7CZ9+lUJucwS27M1ucu9Y5xdM9hBXQaw== X-Google-Smtp-Source: AGHT+IFCjQwcdArTxqBh6uUlbbE9gq3YGlr6O8FZy1Vn0BA6X8Y+KUvtMMlpqnUrg2MAYu5sfrKvUA== X-Received: by 2002:a05:6a00:3cd2:b0:740:9d7c:8f5c with SMTP id d2e1a72fcca58-7423bfe05f3mr17051045b3a.18.1747033259070; Mon, 12 May 2025 00:00:59 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7423d0d186fsm5053327b3a.180.2025.05.12.00.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 00:00:58 -0700 (PDT) From: Maxim Cournoyer To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 1/2] gnu: Add nextpnr. In-Reply-To: <87y0v5tz0u.fsf@inventati.org> (Cayetano Santos's message of "Fri, 09 May 2025 20:33:21 +0200") References: <29af3cc1065ab7b7c02dc36d68fa845db37e22d1.1746294265.git.csantosb@inventati.org> <87selfuvby.fsf@gmail.com> <87y0v5tz0u.fsf@inventati.org> Date: Mon, 12 May 2025 16:00:55 +0900 Message-ID: <87cyces47s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233 Cc: 78233@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) Hi Cayetano Santos writes: >>jeu. 08 mai 2025 at 21:43, Maxim Cournoyer wr= ote: > >> Why do we not build the GUI? We already have the Qt dependencies, it >> seems. > > Simply, I=E2=80=99m unable to compile 0.8 with the gui flag on. > > To me, the priority now is providing in Guix a place and route workflow > for all available nextpnr backends in cli mode, which is what most > engineers use. In a second time, we will investigate how to build the > gui and how activate other interesting options, but I=E2=80=99d rather pr= efer > this point not to be a big stopper to what really matters. Since the current variant of nextpnr-ice40 was building the GUI just fine, and the error was just adjusting the headers location, I've gone ahead and done that. Otherwise it'd have been a regression or feature removal, which we shouldn't do lightly with an update. >> Well done! If the source changes often, a patch could be more >> maintainable; ideally in way that can be forwarded upstream too, with >> good chances of being merged. That's less work for us in the long term. > > Generally speaking, I see what you mean. In this very case, I don=E2=80= =99t > understand how to replace current invocations to inputs > (this-package-input) with a patch; neither I see how upstream might > consider a patch to Guix only requirements, specially, as there is no > support to compilations not using the 3rd party modules they provide. See commit 221899c2023, which introduces two patches [0, 1] to allow using GoogleTest and ImGui/QtImGui from the system before falling back to the bundled copies. [0] https://github.com/YosysHQ/nextpnr/pull/1478 [1] https://github.com/YosysHQ/nextpnr/pull/1480 --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon May 12 03:14:26 2025 Received: (at 78233-done) by debbugs.gnu.org; 12 May 2025 07:14:26 +0000 Received: from localhost ([127.0.0.1]:49558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uENMn-0006j4-S1 for submit@debbugs.gnu.org; Mon, 12 May 2025 03:14:26 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:60732) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uENMj-0006ii-SZ for 78233-done@debbugs.gnu.org; Mon, 12 May 2025 03:14:22 -0400 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-30a8cbddce3so3417221a91.1 for <78233-done@debbugs.gnu.org>; Mon, 12 May 2025 00:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747034055; x=1747638855; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q+zhOjcs+0TDgFltfV8AhUbxnAnbBUwImzPj2dhPJgg=; b=isGymojeohZObMU7xBz5PBAEwGmoMPZ9u83aqABlAxZCQoqGhpCNkNzf7SokjJGPlA o33GY5Fd4pPJ21yAI1vznT7E7H15/CXLHMnELfYBHMgs0DwXOvx9D+BpgNRJFcEC8gNj nGspSQ9wlHMjjCh9lNlCsBSFXNmtGdlCtL1Uy/0Cy6vRcA+JFjN/buONOo5H5niQKl3j RX8yx+gLRhQspuPrXfCoSyRS1mNfgf9KQCyTkECyXIWmYrylGLIP/XXkOXHsirIbKi2G HpIXzBcqOHkwglxkuTmxbmrzxWh8oeRf9BeZyq/Nezo8+XmJH9jREwkwC/q7pJzD4afN GgtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747034055; x=1747638855; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Q+zhOjcs+0TDgFltfV8AhUbxnAnbBUwImzPj2dhPJgg=; b=PgHSKro/MHdrgdtcedn7BvjnQOWBAyG8VFEzulUrEtv1jXy1rAkvf7tVKN+s4Yz0/l 8E6fiER8lbuFGYBNOS/8OQ0y69P66zXUMKwmoc1eITaL1AMqVxudspnEvoFjhifrekqJ RUiYV/f3j9oVyIo/uutSs9er7FUBOUrlRZQ4vfou5+4Jnq3bAI/stiJSApTQv+sSR4j9 GMUcuxPQsHNYBY5RCrLZwcIVLjXhIPPm4GD88shdKcV1evNMxuhIz2O2K2qVkqwXM2Ot 4QtyQIfwCbCscYcS6eFlaTKW6NIAnBNzxvjajO9CxI6EfAseH0gVJVxgSXQd5521LigY wtJw== X-Gm-Message-State: AOJu0YyMeYYl0Mgnd62s/r2HJXhuzhSND1DWfHei/0/1S9axfeZ79am7 bfL/z/kQIm6lv/AJb+wz3OtsRpCjxf9CmZFfPFtVAim13ZK36lWW X-Gm-Gg: ASbGncvCFcTzhWxFIbRjJ/zAoL8WQZhNQ3LwQmmUTaZ/kN2As6D7US53JLZ/G23IrYw Sf8TJFsTdd/1G7qlTtCsSa1FK5I/eD6riDp4ytHGDkgkoTL1XS1re9PTdrxEBGoixuQsvl67BQt j/sVn/Wk987ibfFTL7pLmddN6ZFD1dhClH9sP/XeA9qGLVgs2OlwwfI+OddD96+RCeWmVfQY/0M V6NRfuiYftM5pWmib0tasD9qGmyliKFO1K9O/0m6RCAQWcZyQTcV+bUWKpCTEC6HdN8s5m6TOam stSTcsiSY2WXQL+G6z1Kj3xXUGT7NskUoaXNwppUg41BF0s8zA== X-Google-Smtp-Source: AGHT+IGQQtb2wqI4exEOt3YaF+32BRQURzpyElZvP8w49L9ZbTOINduWfltmyLmcqA0lc22ADOoGXg== X-Received: by 2002:a17:90b:3882:b0:2fe:80cb:ac05 with SMTP id 98e67ed59e1d1-30c3cefe5b5mr20909341a91.9.1747034055217; Mon, 12 May 2025 00:14:15 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30c39e25b8esm5958423a91.4.2025.05.12.00.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 00:14:14 -0700 (PDT) From: Maxim Cournoyer To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. In-Reply-To: <87frhdsjlz.fsf@inventati.org> (Cayetano Santos's message of "Fri, 09 May 2025 20:51:36 +0200") References: <87o6w3uu7z.fsf@gmail.com> <87frhdsjlz.fsf@inventati.org> Date: Mon, 12 May 2025 16:14:12 +0900 Message-ID: <878qn2s3ln.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233-done Cc: 78233-done@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) Hi, Cayetano Santos writes: > n<#secure method=3Dpgpmime mode=3Dsign> > > Hi Maxim, > > Thanks for all your comments ! They=E2=80=99re (almost) included in v2 s= eries. > >>jeu. 08 mai 2025 at 22:07, Maxim Cournoyer wr= ote: > >> Interesting, I had never seen the opendir/closedir approach, perhaps >> because the code base in Guix embraces functional rather than imperative >> style. It'd be more conventional (in Guix at least) to use (ice-9 >> ftw)'s scandir to list the files and apply for-each to its value, and I >> think it'd be more succinct too. >> >> Something like: >> >> (with-directory-excursion "icestorm/examples" >> (for-each (cut invoke "make" "-C" <>) >> (scandir "." >> (negate (cut member <> '("." "= ..")))))) > > I just learned about cut existence, thanks again; I understand its utility > by looking at examples all around the code. No doubt, this is the correct > alternative. > > Unfortunately, I=E2=80=99m unable at this point to use it, I miss the nec= essary > skills: I fall in frequent "unbound variable <>" errors that I don=E2=80= =99t > known yet how to handle, I suspect gexps add a extra layer of complexity > which becomes a barrier to me, sorry for that. > >> Hm, this relocation in the same diff as the changes muddled the scope. >> I thought it was a new entry above, so reviewed it as such. Could you >> please split the relocation as a prior commit with your actual changes >> to review in a 2nd commit on top? This should give a nicer view, as >> Gabriel also noted. > > Let=E2=80=99s forget the relocation by now, as it complicates things with= no > real utility by itself. We will sort things out later on. Change clarity/transparency and easing the review is worth the extra effort, in my opinion. > Just consider that, in reality, nextpnr replaces former nextpnr-ice40 > (it is strongly based on it); new nextpnr-ice40 is a new package (even > if it carries the name of previous one). This is not evident with two co= mmits. > > Two commits, without breaking things up, are necessarily somehow > confusing (and kind of useless, to that matter). To me, the only means > of achieving a nicer diff view is using a single commit, where one may > compare new nextpnr with old nextpnr-ice40, at the same time as it becomes > evident that the new nextpnr-ice40 is an addition. > > V2 is in its way. Thanks for V2, I've used it as the base of nextpnr-ice40 package, for which I've also added patches, as mentioned previously. By first updating nextpnr-ice40 to v0.8 and related changes, and later renaming it to nextpnr with few adjustments needed, the commit history is as clear as it can be. Please have a look/test to make sure everything still works as intended. I didn't keep the phase building the examples as the package already has a test suite, and I didn't see the gain/effort ratio of doing so as worth it. --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon May 12 04:25:50 2025 Received: (at 78233-done) by debbugs.gnu.org; 12 May 2025 08:25:50 +0000 Received: from localhost ([127.0.0.1]:49915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uEOTu-0002Ns-6Q for submit@debbugs.gnu.org; Mon, 12 May 2025 04:25:50 -0400 Received: from latitanza.investici.org ([82.94.249.234]:45237) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uEOTq-0002Nc-K8 for 78233-done@debbugs.gnu.org; Mon, 12 May 2025 04:25:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1747038344; bh=HG7I3a7dG8MbZq8C/BavB8tJJayQmT37Ic8luZs91gA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=r6Aovec1LaZxhri1rIx+L0pjl3/AnGGMQ7+kpxyxu68Mt7dCi4EIvWZ4vkEHzqtrj c4sYhUesrOc1apr2FhhjH2ECF6iha+lFGVBdb/Qmv05tJzFdB5h/GaURfUWpuYnzKY Aa0zx1SSbJ99SQSFEgOwsWYHC0ivQ49I+G/NZ9Cs= Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4Zwt3D6MWFzGpBP; Mon, 12 May 2025 08:25:44 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4Zwt3D4N47zGp9g; Mon, 12 May 2025 08:25:44 +0000 (UTC) From: Cayetano Santos To: Maxim Cournoyer Subject: Re: [bug#78233] [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. In-Reply-To: <878qn2s3ln.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 12 May 2025 16:14:12 +0900") References: <87o6w3uu7z.fsf@gmail.com> <87frhdsjlz.fsf@inventati.org> <878qn2s3ln.fsf@gmail.com> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Mon, 12 May 2025 10:25:43 +0200 Message-ID: <87ecwus0ag.fsf@inventati.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233-done Cc: 78233-done@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >lun. 12 mai 2025 at 16:14, Maxim Cournoyer wro= te: > Thanks for V2, I've used it as the base of nextpnr-ice40 package, for > which I've also added patches, as mentioned previously. Thanks a lot for this ! I=E2=80=99m sure that providing a whole pipeline fo= r fpga development (yosys+nextpnr+fpgaloader) in Guix is a rewarding effort. > By first updating nextpnr-ice40 to v0.8 and related changes, and later > renaming it to nextpnr with few adjustments needed, the commit history > is as clear as it can be. Please have a look/test to make sure > everything still works as intended. Well, I=E2=80=99m afraid I was not clear enough about it, but the whole ori= ginal idea was to get a different package per device: - nextpnr (not public) :: generic package - nextpnr-ice40 (public, inherits from nextpnr) :: icestorm backend - nextpnr-ecp5 (public, inherits from nextpnr) :: prjtrellis backend - nextpnr-generic (public, inherits from nextpnr) :: no backend - nextpnr-himbaechel-gowin (public, inherits from nextpnr) :: - nextpnr-himbaechel-ng-ultra (public, inherits from nextpnr) :: prjbeyond-db backend - nextpnr-nexus :: ... - etc. You can see the overall concept in my testing playground [0]. As it is now, we=E2=80=99d be using a single package for all devices, which= is possible, but complicates things as we would need a huge package definition. In addition, this approach difficults maintenance, IMO, whereas a different package per device/backend eases future upgrades and fixes. Let me know how do you prefer I proceed. > I didn't keep the phase building the examples as the package already has > a test suite, and I didn't see the gain/effort ratio of doing so as > worth it. Consider that nextpnr testing is different from nextpnr-ice40 testing, which again differs from nextpnr-ecp5 testing, etc. Thanks again, Cayetano [0] https://git.sr.ht/~csantosb/guix.channel-electronics/tree/main/item/ele= ctronics/packages/pnr.scm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCaCGwhxccY3NhbnRvc2JA aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mguFoAP9noKpTgxPLBhb8nAlo8i/dQlOx +yWn22FqshJtWtnRRAD+JWky625eBuyNbriD1vJpFOz4c4SDFXkGXMhECwRBUgc= =hVwd -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 12 07:54:24 2025 Received: (at 78233-done) by debbugs.gnu.org; 12 May 2025 11:54:24 +0000 Received: from localhost ([127.0.0.1]:50911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uERjj-00087d-HV for submit@debbugs.gnu.org; Mon, 12 May 2025 07:54:23 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:52248) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uERjg-00087H-IB for 78233-done@debbugs.gnu.org; Mon, 12 May 2025 07:54:21 -0400 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-b1fd59851baso2729245a12.0 for <78233-done@debbugs.gnu.org>; Mon, 12 May 2025 04:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747050854; x=1747655654; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7WT5qLMJDTftvb+dbghlma/HNefJSzIcgBv6vvdTKCQ=; b=Ce0XNIDapgmBhO2jhobYKG+WJRO/95dd+WLrHuYz6MU9T1ydDJRl3C4EGsNqNfTbmf AypTd1R9DA2BOy2m0r/NPPUxgSTAzHVdI0PO/w32A7aXxJOQYM7RSboumg+8u+nCYEvq 0f8zQi1EouTTi/jo9T/mfX4SmTUZgjUedL9V+oQyHS4u/TnsBSgUNDV2fxu3J98cL+HL i624l6dkEGyqGTR3Nw2jrT/CHDBPBgcc9/omGxmQAXEICPJMgoV+KKnzkGgo8ZXEDVt5 qlIo4EvCTPTKAoHu558v66KXVlyIIPGzn1IhG8d4YEL2ood86biiMyMHwheli3zdtVfD iElQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747050854; x=1747655654; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7WT5qLMJDTftvb+dbghlma/HNefJSzIcgBv6vvdTKCQ=; b=iTSwMlEN5ZJS0aLQ2VK2RxSk5bGmQWbmvBkrZ1Hr8ByNqpAmEluQhj/I0oZwIe2Y8q N87dB6DyCeQA4VjMcJ+aBYVysXkRp+0cXAsIIZaiBQE/Mw8AiI7KOT/7cAYxC91e3Q6w tN+herfGGriBn0DQE52Zc/fYQ0zrgLYzAK3pospffSZRH+Rqv2JHMTuRnicWhuyBGzNp u724OjpeT1UuLgIoKy3Jru9fdNrz10RbOsjIou7CZ+6vLjn4HDRSB5Qn5d9ok39jUaLY ITVhrmgAdMW9YBwZjdf8bJ3MAQ8o3NtbOpDW3OkQu1Njj+mPiqCL9S0sp4Dd/sENkxSL Q2xQ== X-Gm-Message-State: AOJu0YzJouvBeZwQDOoYuAQGpzKPXdhHlaaQEzHJxRW6r2nPyRgOQ/Eu MiT7A4h7YpKzI2bYonxUXS8m1GL+wzXl3ndeO8Wluhq/xrtcooPa X-Gm-Gg: ASbGncsGTk/3X10oKv+mHXpf96ntjshn5W22ORUa0i1bVK/P6Eg47CTMiMrNcakEDnY zau4aB+9ky6o8lRasF+UvfkJzWo1SKejtauqOC1yMe9MsZfqy+V+zjz74KHRgtTwI4CgZa0y2l6 niWmOaR5up03cME94NUbrOABkrmbZqoUmfD/o0DpcZeG/4OOsfekBmIUxAM4wYKPI9gOt0acKcQ UCo+EAw4W0tgxn5CQmbIiB3t28ztwb9GvtucGxruPG/tWR4sRpUrEUIzPPJpxj3LXxlIAc9D++d XUU3mUsnQrIEtoacqqsIE8v8mYyUHXIygrgekODOPIBigJCDgw== X-Google-Smtp-Source: AGHT+IFx+7neRCci5AlKQOjhiAfv/galnwu2HBwF59lTDAqLVPFbjHM3tDaBwlLquIJ1T2OWKntz6w== X-Received: by 2002:a17:902:e5c4:b0:21f:7880:8472 with SMTP id d9443c01a7336-22fc8e96263mr217531645ad.35.1747050854208; Mon, 12 May 2025 04:54:14 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc82c0b82sm60489475ad.245.2025.05.12.04.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 04:54:13 -0700 (PDT) From: Maxim Cournoyer To: Cayetano Santos Subject: Re: [bug#78233] [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. In-Reply-To: <87ecwus0ag.fsf@inventati.org> (Cayetano Santos's message of "Mon, 12 May 2025 10:25:43 +0200") References: <87o6w3uu7z.fsf@gmail.com> <87frhdsjlz.fsf@inventati.org> <878qn2s3ln.fsf@gmail.com> <87ecwus0ag.fsf@inventati.org> Date: Mon, 12 May 2025 20:54:11 +0900 Message-ID: <875xi6qc2k.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78233-done Cc: 78233-done@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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 (-) Hi Cayetano, Cayetano Santos writes: >>lun. 12 mai 2025 at 16:14, Maxim Cournoyer wr= ote: > >> Thanks for V2, I've used it as the base of nextpnr-ice40 package, for >> which I've also added patches, as mentioned previously. > > Thanks a lot for this ! I=E2=80=99m sure that providing a whole pipeline = for fpga > development (yosys+nextpnr+fpgaloader) in Guix is a rewarding effort. > >> By first updating nextpnr-ice40 to v0.8 and related changes, and later >> renaming it to nextpnr with few adjustments needed, the commit history >> is as clear as it can be. Please have a look/test to make sure >> everything still works as intended. > > Well, I=E2=80=99m afraid I was not clear enough about it, but the whole o= riginal idea > was to get a different package per device: > > - nextpnr (not public) :: generic package > - nextpnr-ice40 (public, inherits from nextpnr) :: icestorm backend > - nextpnr-ecp5 (public, inherits from nextpnr) :: prjtrellis backend > - nextpnr-generic (public, inherits from nextpnr) :: no backend > - nextpnr-himbaechel-gowin (public, inherits from nextpnr) :: > - nextpnr-himbaechel-ng-ultra (public, inherits from nextpnr) :: > prjbeyond-db backend > - nextpnr-nexus :: ... > - etc. > > You can see the overall concept in my testing playground [0]. I see. That's neat, but I think I'd rather try a single 'nextpnr' package that does it all first, and complicate later if we find it becomes unpractical. The benefits: 1. all the executables share the same library, so space and compute wise, it makes sense they are packaged together. 2. There doesn't seem to be many different inputs to be added to build all the backends, so the maintenance cost should similar. Inheritance also introduce some complexity, by having to keep everything in sync while the Guix tooling doesn't make the relationship easy to discover (via 'guix refresh --list-transitive say'). 3. It's done elsewhere, e.g. in nixpkgs, so we can compare in case of problems. What do you think? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon May 12 08:24:16 2025 Received: (at 78233-done) by debbugs.gnu.org; 12 May 2025 12:24:16 +0000 Received: from localhost ([127.0.0.1]:51115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uESCe-0001Mz-0C for submit@debbugs.gnu.org; Mon, 12 May 2025 08:24:16 -0400 Received: from latitanza.investici.org ([2001:888:2000:56::19]:31843) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uESCZ-0001Mb-1N for 78233-done@debbugs.gnu.org; Mon, 12 May 2025 08:24:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1747052647; bh=pAN0KYC8s88+uw/PXgKRU0Qxsl5keUcM4xcObnoe2uo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JLV0aHVCg7bbvrWHcQpbLnxeXEnen8A7bBuAR/WSdsqXDZvshj8GShqueeBoi+/a9 iO0Yq5wseMOELwdHYBqJoGWF255DDzmT72pPpR476mtqm0h+xA/GTh3nNHguOAmy7z 2Ckr7Fx8ihEPqyx8+Gd5ea7ePyJnmteu4UNZkFAA= Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4ZwzLH6xWKzGp95; Mon, 12 May 2025 12:24:07 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4ZwzLH3v8vzGp7F; Mon, 12 May 2025 12:24:07 +0000 (UTC) From: Cayetano Santos To: Maxim Cournoyer Subject: Re: [bug#78233] [PATCH 2/2] gnu: nextpnr-ice40: Update to 0.8. In-Reply-To: <875xi6qc2k.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 12 May 2025 20:54:11 +0900") References: <87o6w3uu7z.fsf@gmail.com> <87frhdsjlz.fsf@inventati.org> <878qn2s3ln.fsf@gmail.com> <87ecwus0ag.fsf@inventati.org> <875xi6qc2k.fsf@gmail.com> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Mon, 12 May 2025 14:24:05 +0200 Message-ID: <87ikm681ay.fsf@inventati.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 78233-done Cc: 78233-done@debbugs.gnu.org, Gabriel Wicki , Ekaitz Zarraga 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.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >lun. 12 mai 2025 at 20:54, Maxim Cournoyer wro= te: > Hi Cayetano, > > Cayetano Santos writes: > >>>lun. 12 mai 2025 at 16:14, Maxim Cournoyer w= rote: >> >>> Thanks for V2, I've used it as the base of nextpnr-ice40 package, for >>> which I've also added patches, as mentioned previously. >> >> Thanks a lot for this ! I=E2=80=99m sure that providing a whole pipeline= for fpga >> development (yosys+nextpnr+fpgaloader) in Guix is a rewarding effort. >> >>> By first updating nextpnr-ice40 to v0.8 and related changes, and later >>> renaming it to nextpnr with few adjustments needed, the commit history >>> is as clear as it can be. Please have a look/test to make sure >>> everything still works as intended. >> >> Well, I=E2=80=99m afraid I was not clear enough about it, but the whole = original idea >> was to get a different package per device: >> >> - nextpnr (not public) :: generic package >> - nextpnr-ice40 (public, inherits from nextpnr) :: icestorm backend >> - nextpnr-ecp5 (public, inherits from nextpnr) :: prjtrellis backend >> - nextpnr-generic (public, inherits from nextpnr) :: no backend >> - nextpnr-himbaechel-gowin (public, inherits from nextpnr) :: >> - nextpnr-himbaechel-ng-ultra (public, inherits from nextpnr) :: >> prjbeyond-db backend >> - nextpnr-nexus :: ... >> - etc. >> >> You can see the overall concept in my testing playground [0]. > > I see. That's neat, but I think I'd rather try a single 'nextpnr' > package that does it all first, and complicate later if we find it > becomes unpractical. The benefits: > > 1. all the executables share the same library, so space and compute > wise, it makes sense they are packaged together. > > 2. There doesn't seem to be many different inputs to be added to build > all the backends, so the maintenance cost should similar. Inheritance > also introduce some complexity, by having to keep everything in sync > while the Guix tooling doesn't make the relationship easy to discover > (via 'guix refresh --list-transitive say'). > > 3. It's done elsewhere, e.g. in nixpkgs, so we can compare in case of > problems. > > What do you think? Fine with me; just keep in mind that we are not testing the binaries (nextpnr-himbaechel, etc.). This is it: #78390. It builds and performs as expected in all 4 architectures. C. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCaCHoZRccY3NhbnRvc2JA aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgj73AQCJgI90H8g+/AuVkHYQw9o2Lc7I tRDUmD71GzBp+m2aHgD/VovDOwABteJlULrPYamjIMM6JnotIl5KrMK9ty4AtgA= =tTv5 -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Sep 13 15:28:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 10 Jun 2025 11:24:12 +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