summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2026-01-23 12:26:29 +0100
committerRutherther <rutherther@ditigal.xyz>2026-01-25 21:30:31 +0100
commite2840c2126edaadb13da63f5b6a8c17f9d7d21c5 (patch)
tree67d526f5306d69969e674cab9096061d9b23f4e9
parent7c620d0c757a15008a0219d02203580283ce83ea (diff)
gnu: Add neorv32.
* gnu/packages/hdl.scm: New variable. * CODEOWNERS: Regenerate. * gnu/local.mk: Register. * po/packages/POTFILES.in: Likewise. * etc/teams.scm (electronics)<#:scope>: Add "gnu/packages/hdl.scm". Change-Id: I188087a03272b9a63f23fd96c9cd2af7228dc0d9 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
-rw-r--r--CODEOWNERS1
-rwxr-xr-xetc/teams.scm1
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/hdl.scm89
-rw-r--r--po/packages/POTFILES.in1
5 files changed, 93 insertions, 0 deletions
diff --git a/CODEOWNERS b/CODEOWNERS
index 0a0015208fd..86dabfda2d5 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -146,6 +146,7 @@ gnu/system/examples/lightweight-desktop\.tmpl @guix/documentation
146gnu/system/examples/desktop\.tmpl @guix/documentation 146gnu/system/examples/desktop\.tmpl @guix/documentation
147 147
148gnu/packages/electronics\.scm @guix/electronics 148gnu/packages/electronics\.scm @guix/electronics
149gnu/packages/hdl\.scm @guix/electronics
149gnu/packages/libftdi\.scm @guix/electronics 150gnu/packages/libftdi\.scm @guix/electronics
150gnu/packages/engineering\.scm @guix/electronics 151gnu/packages/engineering\.scm @guix/electronics
151gnu/packages/flashing-tools\.scm @guix/electronics 152gnu/packages/flashing-tools\.scm @guix/electronics
diff --git a/etc/teams.scm b/etc/teams.scm
index 10902e81a2b..1650286c425 100755
--- a/etc/teams.scm
+++ b/etc/teams.scm
@@ -630,6 +630,7 @@ of Rebar and Mix build systems and Hex.pm importer."
630 #:name "Electronics team" 630 #:name "Electronics team"
631 #:description "Electronics and hardware related packages." 631 #:description "Electronics and hardware related packages."
632 #:scope (list "gnu/packages/electronics.scm" 632 #:scope (list "gnu/packages/electronics.scm"
633 "gnu/packages/hdl.scm"
633 "gnu/packages/libftdi.scm" 634 "gnu/packages/libftdi.scm"
634 "gnu/packages/engineering.scm" 635 "gnu/packages/engineering.scm"
635 "gnu/packages/flashing-tools.scm"))) 636 "gnu/packages/flashing-tools.scm")))
diff --git a/gnu/local.mk b/gnu/local.mk
index c600d73fe57..1676508e029 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -367,6 +367,7 @@ GNU_SYSTEM_MODULES = \
367 %D%/packages/haskell-web.scm \ 367 %D%/packages/haskell-web.scm \
368 %D%/packages/haskell-xyz.scm \ 368 %D%/packages/haskell-xyz.scm \
369 %D%/packages/haxe.scm \ 369 %D%/packages/haxe.scm \
370 %D%/packages/hdl.scm \
370 %D%/packages/heads.scm \ 371 %D%/packages/heads.scm \
371 %D%/packages/hexedit.scm \ 372 %D%/packages/hexedit.scm \
372 %D%/packages/high-availability.scm \ 373 %D%/packages/high-availability.scm \
diff --git a/gnu/packages/hdl.scm b/gnu/packages/hdl.scm
new file mode 100644
index 00000000000..c8ad7c22231
--- /dev/null
+++ b/gnu/packages/hdl.scm
@@ -0,0 +1,89 @@
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2026 Cayetano Santos <csantosb@inventati.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages hdl)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix build-system copy)
22 #:use-module (guix gexp)
23 #:use-module (guix git-download)
24 #:use-module (guix packages)
25 #:use-module (gnu packages electronics))
26
27(define-public neorv32
28 (package
29 (name "neorv32")
30 (version "1.12.7")
31 (source
32 (origin
33 (method git-fetch)
34 (uri (git-reference
35 (url "https://github.com/stnolting/neorv32")
36 (commit (string-append "v" version))))
37 (file-name (git-file-name name version))
38 (sha256
39 (base32
40 "030djnf5ww4b2w6lhb9lpprq2iawf8v93rmmgfgnbr56k4blyyk6"))))
41 (outputs
42 '("out" "neorv32"))
43 (build-system copy-build-system)
44 (arguments
45 (list
46 #:tests? #f ;FIXME: nvc checksum errors inside the build env
47 #:phases
48 #~(modify-phases %standard-phases
49 (add-after 'install 'check
50 (lambda* (#:key tests? #:allow-other-keys)
51 (when tests?
52 (substitute* '("rtl/file_list_cpu.f" "rtl/file_list_soc.f")
53 (("NEORV32_RTL_PATH_PLACEHOLDER") "rtl"))
54 (for-each
55 (lambda (f)
56 (invoke
57 "sh" "-c"
58 (format #f "cat rtl/~a.f | xargs nvc --work=neorv32 -a" f)))
59 '("file_list_soc" "file_list_cpu"))
60 (for-each
61 (lambda (f)
62 (invoke "nvc" "--work=neorv32" "-a" f))
63 `("sim/sim_uart_rx.vhd"
64 ,@(find-files "sim" "x.*\\.vhd$")
65 "sim/neorv32_tb.vhd"))
66 (invoke "nvc" "--work=neorv32" "-e" "neorv32_tb")
67 (invoke "nvc" "--work=neorv32" "-r" "--stop-time=10ms"
68 "neorv32_tb")))))
69 #:install-plan
70 #~'(("rtl" "share/neorv32/work/rtl"
71 #:exclude-regexp (".*\\.f$" ".*\\.sh$"))
72 ("rtl" "share/neorv32/neorv32/rtl"
73 #:exclude-regexp (".*\\.f$" ".*\\.sh$")
74 #:output "neorv32"))))
75 (native-inputs (list nvc))
76 (native-search-paths
77 (list (search-path-specification
78 (variable "FW_NEORV32")
79 (separator #f)
80 (files (list "share/neorv32")))))
81 (home-page "https://stnolting.github.io/neorv32/")
82 (synopsis "RISC-V soft core CPU in VHDL")
83 (description
84 "Neorv32 is a small, customizable 32 bits microcontroller-like system on
85chip written in platform-independent VHDL.")
86 (properties
87 `((output-synopsis "out" "Instance this design library as work")
88 (output-synopsis "neorv32" "Instance this design library as neorv32")))
89 (license license:bsd-3)))
diff --git a/po/packages/POTFILES.in b/po/packages/POTFILES.in
index 8aecdecf566..68055e36c71 100644
--- a/po/packages/POTFILES.in
+++ b/po/packages/POTFILES.in
@@ -198,6 +198,7 @@ gnu/packages/haskell-web.scm
198gnu/packages/haskell-xyz.scm 198gnu/packages/haskell-xyz.scm
199gnu/packages/haskell.scm 199gnu/packages/haskell.scm
200gnu/packages/haxe.scm 200gnu/packages/haxe.scm
201gnu/packages/hdl.scm
201gnu/packages/heads.scm 202gnu/packages/heads.scm
202gnu/packages/hexedit.scm 203gnu/packages/hexedit.scm
203gnu/packages/high-availability.scm 204gnu/packages/high-availability.scm