GNU bug report logs - #78422
[PATCH electronics-team] gnu: Add python-apycula.

Previous Next

Package: guix-patches;

Reported by: Cayetano Santos <csantosb <at> inventati.org>

Date: Wed, 14 May 2025 10:31:02 UTC

Severity: normal

Tags: moreinfo, patch

To reply to this bug, email your comments to 78422 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Wed, 14 May 2025 10:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cayetano Santos <csantosb <at> inventati.org>:
New bug report received and forwarded. Copy sent to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org. (Wed, 14 May 2025 10:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: guix-patches <at> gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH electronics-team] gnu: Add python-apycula.
Date: Wed, 14 May 2025 12:30:07 +0200
* gnu/packages/electronics.scm (python-apycula): New variable.

Change-Id: I8e65416c1a555be189e9b8433d1ec7165aee16e9
---
 gnu/packages/electronics.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index da37a9fb33..36e1909d36 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -563,6 +563,39 @@ (define-public pulseview
 for sigrok.")
     (license license:gpl3+)))
 
+(define-public python-apycula
+  (package
+    (name "python-apycula")
+    (version "0.18")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/YosysHQ/apicula/")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0r1qx2q5dyjj3085g4ql41b21108m0s3wb7ylsy7xllvw527798l"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ;requires network
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'sanity-check-fix
+            (lambda _
+              (substitute* "setup.py"
+                (("'gowin_bba")
+                 "# 'gowin_bbva")))))))
+    (propagated-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: 5f5d84beccc180f1b51474c0e47eb6e0d0c9175f
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Wed, 14 May 2025 10:40:01 GMT) Full text and rfc822 format available.

Message #8 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 78422 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78422] [PATCH electronics-team] gnu: Add python-apycula.
Date: Wed, 14 May 2025 12:39:31 +0200
On Wed, May 14, 2025 at 12:30:07PM +0200, Cayetano Santos wrote:
> +      #:tests? #f                       ;requires network
This is a pity - any chance we could disable just a single test that
needs networking or do all tests need it?
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'sanity-check-fix
> +            (lambda _
> +              (substitute* "setup.py"
> +                (("'gowin_bba")
> +                 "# 'gowin_bbva")))))))
You (probably) could just substitute with an empty string "" (aka
deleting) instead of commenting it out.  But it doesn't really matter.
Maybe a comment on why this fixes anything could be a nice pointer for
future us on why it is/was necessary?


Apart from these questions this LGTM.

If it builds, works as expected and the linter is happy this could be
merged IMO.


Thanks for your time and effort!
gabber




Information forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Wed, 14 May 2025 12:25:11 GMT) Full text and rfc822 format available.

Message #11 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: 78422 <at> debbugs.gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>,
 Cayetano Santos via Guix-patches via <guix-patches <at> gnu.org>
Subject: [PATCH electronics-team v2] gnu: Add python-apycula.
Date: Wed, 14 May 2025 14:24:12 +0200
From: Cayetano Santos via Guix-patches via <guix-patches <at> gnu.org>

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

Change-Id: I8e65416c1a555be189e9b8433d1ec7165aee16e9
Signed-off-by: Cayetano Santos <csantosb <at> inventati.org>
---
 gnu/packages/electronics.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index da37a9fb33..4dc9264fbf 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)
@@ -563,6 +564,36 @@ (define-public pulseview
 for sigrok.")
     (license license:gpl3+)))
 
+(define-public python-apycula
+  (package
+    (name "python-apycula")
+    (version "0.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Apycula" version))
+       (sha256
+        (base32 "167jif24568q5b9d9zdrp60c1qnjxmanhld6q3wx251i3sgrfilx"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ;requires network
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'sanity-check-fix
+            (lambda _
+              (substitute* "setup.py"
+                (("'gowin_bba")
+                 "# 'gowin_bbva")))))))
+    (propagated-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: 5f5d84beccc180f1b51474c0e47eb6e0d0c9175f
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Thu, 15 May 2025 06:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 78425 <at> debbugs.gnu.org, 78422 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78425] [PATCH electronics-team v2] gnu: Add python-apycula.
Date: Thu, 15 May 2025 08:45:42 +0200
Hi!

It seems like you did neither answer nor address any of my questions
from the previous review.  And I have a hard time finding any
differences between the original patch and this v2 (at least by naked
eye).  Is this by mistake?  Would you mind answering my questions, so we
can find ways for this patch to land optimally?

Thanks - again - for your time and effort!

gabber




Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 16 May 2025 14:43:03 GMT) Full text and rfc822 format available.

Information forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Mon, 19 May 2025 14:17:02 GMT) Full text and rfc822 format available.

Message #19 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: 78422 <at> debbugs.gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH electronics-team v3] gnu: Add python-apycula.
Date: Mon, 19 May 2025 16:16:17 +0200
* gnu/packages/electronics.scm (python-apycula): New variable.

Change-Id: I8e65416c1a555be189e9b8433d1ec7165aee16e9
---
 gnu/packages/electronics.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index dc9de79ffa..2736df4b3c 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)
@@ -560,6 +561,38 @@ (define-public pulseview
     (description "PulseView is a Qt based logic analyzer, oscilloscope and MSO GUI
 for sigrok.")
     (license license:gpl3+)))
+(define-public python-apycula
+  (package
+    (name "python-apycula")
+    (version "0.19")
+    ;; 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 "034crnlrb3dlwwc75gpskyz47jvhcv0c3l74z5rpyz622ajv46d6"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ;requires Gowin EDA tools
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Fix error related to import of 'apycula.gowin_bba'.
+          (add-after 'unpack 'sanity-check-fix
+            (lambda _
+              (substitute* "setup.py"
+                (("'gowin_bba")
+                 "# 'gowin_bbva")))))))
+    (propagated-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

base-commit: 450a361532573a02389530a6a80b7821683ed41b
--
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Mon, 19 May 2025 17:11:02 GMT) Full text and rfc822 format available.

Message #22 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 78422 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78422] [PATCH electronics-team v3] gnu: Add python-apycula.
Date: Mon, 19 May 2025 19:10:24 +0200
LGTM




Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Tue, 20 May 2025 23:19:02 GMT) Full text and rfc822 format available.

Message #25 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>, 78422 <at> debbugs.gnu.org,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: bug#78422: [PATCH electronics-team] gnu: Add python-apycula.
Date: Wed, 21 May 2025 08:18:19 +0900
Hi,

Cayetano Santos <csantosb <at> inventati.org> writes:

> * gnu/packages/electronics.scm (python-apycula): New variable.
>
> Change-Id: I8e65416c1a555be189e9b8433d1ec7165aee16e9
> ---
>  gnu/packages/electronics.scm | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
> index dc9de79ffa..2736df4b3c 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)
> @@ -560,6 +561,38 @@ (define-public pulseview
>      (description "PulseView is a Qt based logic analyzer, oscilloscope and MSO GUI
>  for sigrok.")
>      (license license:gpl3+)))
> +(define-public python-apycula
> +  (package
> +    (name "python-apycula")
> +    (version "0.19")
> +    ;; The pypi tar.gz file includes the necessary .pickle files, not available
> +    ;; in the home-page repository.

That sounds like potentially bundled pre-generated sources (I hope not
binaries?).  How are these generated?  Ideally we'd generate everything
needed from sources.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Tue, 20 May 2025 23:24:02 GMT) Full text and rfc822 format available.

Message #28 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>, 78422 <at> debbugs.gnu.org,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: bug#78422: [PATCH electronics-team] gnu: Add python-apycula.
Date: Wed, 21 May 2025 08:23:42 +0900
Hi,

Cayetano Santos <csantosb <at> inventati.org> writes:

> * gnu/packages/electronics.scm (python-apycula): New variable.
>
> Change-Id: I8e65416c1a555be189e9b8433d1ec7165aee16e9
> ---
>  gnu/packages/electronics.scm | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
> index dc9de79ffa..2736df4b3c 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)
> @@ -560,6 +561,38 @@ (define-public pulseview
>      (description "PulseView is a Qt based logic analyzer, oscilloscope and MSO GUI
>  for sigrok.")
>      (license license:gpl3+)))
> +(define-public python-apycula
> +  (package
> +    (name "python-apycula")
> +    (version "0.19")
> +    ;; The pypi tar.gz file includes the necessary .pickle files, not available
> +    ;; in the home-page repository.

It looks like running just 'make' in the repository should suffice to
generate the .pickle files, which are apparently some database files
("chipdb") [0].

Could you give it a try, and perhaps fetch from git instead to avoid the
pregenerated sources (else clean it up in a snippet phase) ?

Thanks!

[0]  https://github.com/YosysHQ/apicula/blob/master/Makefile

-- 
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Tue, 20 May 2025 23:42:01 GMT) Full text and rfc822 format available.

Message #31 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>, 78422 <at> debbugs.gnu.org,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78422] [PATCH electronics-team v3] gnu: Add python-apycula.
Date: Wed, 21 May 2025 08:41:47 +0900
Hi,

I tried locally, this is my local changes so far:

--8<---------------cut here---------------start------------->8---
(define-public apycula
  (package
    (name "apycula")
    (version "0.19")
    ;; The pypi tar.gz file includes the necessary .pickle files, not available
    ;; in the home-page repository.
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/YosysHQ/apicula")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "0i3p3x3hs7c2dw5g6wa5g9lh551f5drb0abp7p3gkcfq4hi7bwm0"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:tests? #f                       ;requires Gowin EDA tools
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'generate-chipdb-files
            (lambda _
              (invoke "make" "GOWINHOME=/tmp")))
          (add-after 'unpack 'sanity-check-fix
            (lambda _
              ;; The module name changed (see:
              ;; https://github.com/YosysHQ/apicula/issues/337).
              (substitute* "setup.py"
                (("'gowin_bba")
                 "# 'gowin_bbva")))))))
    (native-inputs (list python-setuptools python-wheel
                         ;gowin-eda   ;; PACKAGE ME!
                         ))
    (inputs (list python-crc))
    (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)))
--8<---------------cut here---------------end--------------->8---

I'm fetching from git, and renamed the package to just 'apycula' since
it appears intended to be used as tools (commands), not as a library.
I've also reported the bug found upstream and linked it here.  Thus we
can also make propagated-inputs just inputs, since they are captured in
the command wrapper scripts.

The problem now is that to generate the chipdb files we need gowin-eda.
Since this would also enable running the test suite, I think gowin-eda
should be packaged first and added to the native inputs here:

--8<---------------cut here---------------start------------->8---
starting phase `generate-chipdb-files'
python3 -m apycula.tiled_fuzzer GW1N-1
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/tmp/guix-build-apycula-0.19.drv-0/source/apycula/tiled_fuzzer.py", line 231, in <module>
    with open(f"{gowinhome}/IDE/share/device/{device}/{device}.fse", 'rb') as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/IDE/share/device/GW1N-1/GW1N-1.fse'
make: *** [Makefile:12: GW1N-1_stage1.pickle] Error 1
error: in phase 'generate-chipdb-files': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("GOWINHOME=/tmp") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `generate-chipdb-files' failed after 0.1 seconds
--8<---------------cut here---------------end--------------->8---

Cayetano, could you please try packaging gowin-eda and using it here, to
get past the above issue?  And see if we can enable the test suite too!

--
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Wed, 21 May 2025 08:30:03 GMT) Full text and rfc822 format available.

Message #34 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>, 78422 <at> debbugs.gnu.org,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78422] [PATCH electronics-team v3] gnu: Add python-apycula.
Date: Wed, 21 May 2025 10:29:45 +0200
[Message part 1 (text/plain, inline)]
>mer. 21 mai 2025 at 08:41, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

Hi Maxim,

> I'm fetching from git, and renamed the package to just 'apycula' since
> it appears intended to be used as tools (commands), not as a library.

Just for the record, this package would allow including support for
gowin in guix nextpnr package, see [0], implementing a whole guix
workflow for gowin fpgas.

> The problem now is that to generate the chipdb files we need gowin-eda.
> Since this would also enable running the test suite, I think gowin-eda
> should be packaged first and added to the native inputs here:

Sorry, my bad. I assumed pickle files were acceptable for guix, while
clearly they are not.

Now, gowin-eda [1] are proprietary tools, for as much as I know, so I’m
afraid this is a closed path for us, unless I figure out a clean way to
obtain the necessary files under a free license. I’ll take the time to investigate,

Thanks again for your help,

C.

[0] https://research.utwente.nl/files/249654527/DeVos2020complete.pdf
[1] https://www.gowinsemi.com/en/support/home/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Wed, 21 May 2025 09:15:02 GMT) Full text and rfc822 format available.

Message #37 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>, 78422 <at> debbugs.gnu.org,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78422] [PATCH electronics-team v3] gnu: Add python-apycula.
Date: Wed, 21 May 2025 18:14:37 +0900
Hello,

Cayetano Santos <csantosb <at> inventati.org> writes:

>>mer. 21 mai 2025 at 08:41, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
>
> Hi Maxim,
>
>> I'm fetching from git, and renamed the package to just 'apycula' since
>> it appears intended to be used as tools (commands), not as a library.
>
> Just for the record, this package would allow including support for
> gowin in guix nextpnr package, see [0], implementing a whole guix
> workflow for gowin fpgas.

Neat!

>> The problem now is that to generate the chipdb files we need gowin-eda.
>> Since this would also enable running the test suite, I think gowin-eda
>> should be packaged first and added to the native inputs here:
>
> Sorry, my bad. I assumed pickle files were acceptable for guix, while
> clearly they are not.

They may be!  Since they can be considered data files (thus
non-funtional), the license terms per the GNU FSDG are relaxed: the
license that applies to these may be non-free, and what matters is being
able to redistribute these freely, without any restriction [0].  See the
'Non-functional Data' paragraph at [0].

[0]  https://www.gnu.org/distros/free-system-distribution-guidelines.html

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Wed, 21 May 2025 09:49:01 GMT) Full text and rfc822 format available.

Message #40 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>, 78422 <at> debbugs.gnu.org,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: [bug#78422] [PATCH electronics-team v3] gnu: Add python-apycula.
Date: Wed, 21 May 2025 11:48:31 +0200
[Message part 1 (text/plain, inline)]
>mer. 21 mai 2025 at 18:14, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

>>> The problem now is that to generate the chipdb files we need gowin-eda.
>>> Since this would also enable running the test suite, I think gowin-eda
>>> should be packaged first and added to the native inputs here:
>>
>> Sorry, my bad. I assumed pickle files were acceptable for guix, while
>> clearly they are not.
>
> They may be!  Since they can be considered data files (thus
> non-funtional), the license terms per the GNU FSDG are relaxed: the
> license that applies to these may be non-free, and what matters is being
> able to redistribute these freely, without any restriction [0].  See the
> 'Non-functional Data' paragraph at [0].

This means a v4, including a ref to the issue you just open, might be accepted ?

Otherwise, we have the huge and public educational distribution of the
gowin ide [0] (the 784.12MB thing), but we’d rather avoid such an
horror; anyway it is unclear to me the license which applies here.

[0] https://www.gowinsemi.com.cn/faq.aspx
[signature.asc (application/pgp-signature, inline)]

Information forwarded to csantosb <at> inventati.org, ekaitz <at> elenq.tech, gabriel <at> erlikon.ch, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#78422; Package guix-patches. (Tue, 10 Jun 2025 09:04:02 GMT) Full text and rfc822 format available.

Message #43 received at 78422 <at> debbugs.gnu.org (full text, mbox):

From: Cayetano Santos <csantosb <at> inventati.org>
To: 78422 <at> debbugs.gnu.org
Cc: Cayetano Santos via Guix-patches via <guix-patches <at> gnu.org>
Subject: [PATCH electronics-team v4] gnu: Add apycula.
Date: Tue, 10 Jun 2025 10:57:02 +0200
From: Cayetano Santos via Guix-patches via <guix-patches <at> gnu.org>

* 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





This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.