summaryrefslogtreecommitdiff
path: root/gnu/packages/electronics.scm
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2025-04-14 10:48:16 +0200
committerAndreas Enge <andreas@enge.fr>2025-04-14 11:00:00 +0200
commit5b13aa9ea4f998f616c5354cae430e15ca60b5cd (patch)
tree7e071348e0ff5ba4bb407c7eb055b3ec3f145041 /gnu/packages/electronics.scm
parent59d031253f628d89e6909b5347c1ea6841e9cf77 (diff)
gnu: Add python-surf.
* gnu/packages/electronics.scm (python-surf): New variable. Change-Id: Iddedfd5acfe3dbe04e092de27b42b6fdf1c95fb1 Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu/packages/electronics.scm')
-rw-r--r--gnu/packages/electronics.scm40
1 files changed, 39 insertions, 1 deletions
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 0d2d9db73c4..eb3f5b4ec9a 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -65,7 +65,8 @@
#:use-module (gnu packages sdl)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages stb)
- #:use-module (gnu packages toolkits))
+ #:use-module (gnu packages toolkits)
+ #:use-module (gnu packages version-control))
(define-public libserialport
(package
@@ -645,3 +646,40 @@ some tool-specific options are set.")
"VSG lets you define a VHDL coding style and provides a command-line tool
to enforce it.")
(license license:gpl3+)))
+
+(define-public python-surf
+ (package
+ (name "python-surf")
+ (version "2.57.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/slaclab/surf/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ncb34mdxaw0m6cnk7kvl7mkhwa6hpcxkc2lgarwcmmnfydr8kg3"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-deps
+ (lambda _
+ (invoke "git" "init") ;expects a git repo
+ ;; fix version
+ (substitute* "setup.py"
+ (("rawVer .*")
+ (string-append "rawVer = \"v"
+ #$version "\""))))))))
+ (native-inputs (list python-setuptools python-wheel python-gitpython
+ git-minimal/pinned))
+ (home-page "https://slaclab.github.io/surf/")
+ (synopsis "SLAC Ultimate RTL Framework")
+ (description
+ "Surf is a python library with support functions for VHDL gateware
+digital design. It provides implementation modules compatible with FPGA and ASIC
+design.")
+ (license (license:non-copyleft "file://LICENSE.txt"
+ "See LICENSE.txt in the distribution."))))