Subject: [bug#78743] [PATCH electronics-team v4] gnu: Add apycula.

From: Cayetano Santos <[email-masked]>
Date: Tue, 10 Jun 2025 10:57:02 +0200

From: Cayetano Santos via Guix-patches via <[email-masked]>

* gnu/packages/electronics.scm (apycula): New variable.

Change-Id: I8e65416c1a555be189e9b8433d1ec7165aee16e9

---

With respect to previous version:

- updated to 0.20
- removed sanity-check-fix, as for github.com/YosysHQ/apicula/issues/337
- renamed package

Pickle files in the tar.gz need to be produced with gowin-eda, which cannot be packaged. To my understanding, these files are distributed under a mit license.

 gnu/packages/electronics.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 5910b5cc39..9a7c2b69df 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -29,6 +29,7 @@ (define-module (gnu packages electronics)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system pyproject)
+  #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
@@ -561,6 +562,31 @@ (define-public pulseview
 for sigrok.")
     (license license:gpl3+)))
 
+(define-public apycula
+  (package
+    (name "apycula")
+    (version "0.20")
+    ;; The pypi tar.gz file includes the necessary .pickle files, not available
+    ;; in the home-page repository.
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Apycula" version))
+       (sha256
+        (base32 "1dyi14kydn2cq4zja9aqjn1ic78g453i18f3hy7a6bxn746291yz"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f)) ;requires Gowin EDA tools
+    (inputs (list python-crc))
+    (native-inputs (list python-setuptools python-wheel))
+    (home-page "https://github.com/YosysHQ/apicula/")
+    (synopsis "Gowin FPGA bitstream format")
+    (description
+     "The project Apycula provides tools to support development and
+generating bitstreams with Gowin FPGAs.")
+    (license license:expat)))
+
 (define-public python-edalize
   (package
     (name "python-edalize")

base-commit: 5fd4df347e04b6cd3ce3fc91900f773a2e4824e3
--
2.49.0