guix_mirror_bot pushed a commit to branch master
in repository guix.
commit e3fe03c5ed44b5db1d850471fab98ea33fc95d6d
Author: Thomas Kramer <[email protected]>
AuthorDate: Sun Jan 25 14:41:00 2026 +0000
gnu: Add gdstk.
* gnu/packages/electronics.scm (gdstk): New variable
Merges guix/guix!5798
Change-Id: Ic159f22e31fadb7f348bf768b1e23e0ef71d2331
Signed-off-by: Cayetano Santos <[email protected]>
---
gnu/packages/electronics.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index c1c86e98a3..a4f94ee29d 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -438,6 +438,51 @@ hardware designs in Verilog.")
(home-page "https://github.com/ZipCPU/zipcpu/")
(license license:lgpl3+))))
+(define-public gdstk
+ (package
+ (name "gdstk")
+ (version "0.9.62")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/heitzmann/gdstk")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "0q07g7h613yqszgs49vbnran3pz6yayc0hyisdnp4fi60cyzsz1l"))
+ (file-name (git-file-name name version))
+ (snippet '(begin
+ ;; This snippet is also inherited by python-gdstk.
+ (use-modules (guix build utils))
+ ;; Disable 'external' source code directory.
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(external\\)")
+ ""))
+ (delete-file-recursively "external")
+ (substitute* "src/CMakeLists.txt"
+ (("clipper)")
+ "polyclipping)"))
+ (substitute* "src/clipper_tools.cpp"
+ (("clipper/")
+ "polyclipping/"))))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'build-examples
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "examples")))))))
+ (inputs (list clipper qhull zlib))
+ (home-page "https://heitzmann.github.io/gdstk/")
+ (synopsis "Library for creation and manipulation of GDSII files")
+ (description
+ "@code{gdstk} is a library for creation and manipulation of GDSII
+layout files which are commonly used for
+@acronym{EDA, elecronic design automation} and chip design.")
+ (license license:boost1.0)))
+
(define-public gerbv
(package
(name "gerbv")