From 2296d75f8df31ee117f014fa105fea77b4e09d23 Mon Sep 17 00:00:00 2001 From: Peter Polidoro Date: Fri, 20 Mar 2026 14:56:20 -0400 Subject: [PATCH] gnu: Move kicad packages to electronics module. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/engineering.scm (kicad, kicad-doc, kicad-footprints) (kicad-packages3d, kicad-symbols, kicad-templates): Move from here… * gnu/packages/electronics.scm: … to here. Change-Id: I9f06dc4eb44fe2b5597b23b184852f12e17af8e0 Signed-off-by: Liliana Marie Prikler --- gnu/packages/electronics.scm | 254 ++++++++++++++++++++++++++++++++++- gnu/packages/engineering.scm | 227 ------------------------------- 2 files changed, 247 insertions(+), 234 deletions(-) diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 838135dc83..3698abb571 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -1,18 +1,18 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018 Theodoros Foradis -;;; Copyright © 2018–2021 Tobias Geerinckx-Rice +;;; Copyright © 2018-2021, 2023 Tobias Geerinckx-Rice ;;; Copyright © 2019 Clément Lassieur ;;; Copyright © 2018-2019 Arun Isaac -;;; Copyright © 2021, 2023, 2024 Efraim Flashner +;;; Copyright © 2017-2018, 2021, 2023-2024 Efraim Flashner ;;; Copyright © 2021 Leo Famulari -;;; Copyright © 2022, 2023, 2025 Maxim Cournoyer +;;; Copyright © 2021-2023, 2025 Maxim Cournoyer ;;; Copyright © 2024 Juliana Sims ;;; Copyright © 2025, 2026 Cayetano Santos -;;; Copyright © 2025 Sharlatan Hellseher +;;; Copyright © 2025-2026 Sharlatan Hellseher ;;; Copyright © 2022 Konstantinos Agiannis ;;; Copyright © 2015-2025 Ricardo Wurmus ;;; Copyright © 2022, 2024, 2025 Artyom V. Poptsov -;;; Copyright © 2016 Danny Milosavljevic +;;; Copyright © 2016, 2018 Danny Milosavljevic ;;; Copyright © 2019 Amin Bandali ;;; Copyright © 2020-2025 Vinicius Monego ;;; Copyright © 2021 Andrew Miloradovsky @@ -24,12 +24,22 @@ ;;; Copyright © 2022, 2025 Evgeny Pisemsky ;;; Copyright © 2025, Ekaitz Zarraga ;;; Copyright © 2021, 2022 Guillaume Le Vaillant -;;; Copyright © 2020, 2023 Marius Bakke +;;; Copyright © 2018, 2020-2023 Marius Bakke ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2025, 2026 Gabriel Wicki ;;; Copyright © 2026 Thomas Kramer ;;; Copyright © 2023 pinoaffe -;;; Copyright © 2018, 2021 Ludovic Courtès +;;; Copyright © 2018, 2020-2021 Ludovic Courtès +;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2025 Greg Hogan +;;; Copyright © 2018 Jonathan Brielmaier +;;; Copyright © 2021 Julien Lepiller +;;; Copyright © 2021 Mathieu Othacehe +;;; Copyright © 2025 Nicolas Graves +;;; Copyright © 2021-2026 Peter Polidoro +;;; Copyright © 2022 Petr Hodina +;;; Copyright © 2025 Thomas Guillermo Albers Raviola +;;; Copyright © 2019 Vagrant Cascadian ;;; ;;; This file is part of GNU Guix. ;;; @@ -76,6 +86,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages curl) + #:use-module (gnu packages databases) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages embedded) @@ -131,6 +142,7 @@ #:use-module (gnu packages readline) #:use-module (gnu packages regex) #:use-module (gnu packages ruby) + #:use-module (gnu packages ruby-xyz) #:use-module (gnu packages sdl) #:use-module (gnu packages serialization) #:use-module (gnu packages shells) @@ -145,6 +157,7 @@ #:use-module (gnu packages toolkits) #:use-module (gnu packages version-control) #:use-module (gnu packages web) + #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) @@ -1053,6 +1066,233 @@ It simulates the netlists of the cells with ngspice and writes the characterization result in a liberty library file.") (license license:agpl3+))) +(define-public kicad + (package + (name "kicad") + (version "9.0.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/code/kicad.git") + (commit version))) + (sha256 + (base32 + "1b995p0qb9cjpj0n3x3szbqr6d7fxwmrp2nbx37y7ym2bc1lpxd8")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + `(#:out-of-source? #t + #:tests? #f ;no tests + #:build-type "Release" + #:configure-flags + ,#~(list "-DKICAD_SCRIPTING_PYTHON3=ON" + (string-append "-DOCC_INCLUDE_DIR=" + #$(this-package-input "opencascade-occt") + "/include/opencascade") + "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON" + "-DKICAD_USE_EGL=OFF" + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE" + "-DCMAKE_BUILD_TYPE=RelWithDebInfo") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-ngspice-detection + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "eeschema/CMakeLists.txt" + (("NGSPICE_DLL_FILE=\"\\$\\{NGSPICE_DLL_FILE\\}\"") + (string-append "NGSPICE_DLL_FILE=\"" + (assoc-ref inputs "libngspice") + "/lib/libngspice.so\""))))) + (add-after 'install 'wrap-program + ;; Ensure correct Python at runtime. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref inputs "python")) + (file (string-append out "/bin/kicad")) + (path (string-append out "/lib/python" + ,(version-major+minor (package-version + python)) + "/site-packages:" + (getenv "GUIX_PYTHONPATH")))) + (wrap-program file + `("GUIX_PYTHONPATH" ":" prefix + (,path)) + `("PATH" ":" prefix + (,(string-append python "/bin:")))))))))) + (native-search-paths + ;; Currently, KiCad environment variables are single-valued + ;; (see https://gitlab.com/kicad/code/kicad/-/issues/14792). + (list (search-path-specification + (variable "KICAD") ;to find kicad-doc + (files '("")) + (separator #f)) + (search-path-specification + (variable "KICAD9_TEMPLATE_DIR") + (files '("share/kicad/template")) + (separator #f)) + (search-path-specification + (variable "KICAD9_SYMBOL_DIR") + (files '("share/kicad/symbols")) + (separator #f)) + (search-path-specification + (variable "KICAD9_FOOTPRINT_DIR") + (files '("share/kicad/footprints")) + (separator #f)) + (search-path-specification + (variable "KICAD9_3DMODEL_DIR") + (files '("share/kicad/3dmodels")) + (separator #f)) + (search-path-specification + (variable "KICAD_STOCK_DATA_HOME") + (files '("share/kicad")) + (separator #f)))) + (native-inputs (list boost + desktop-file-utils + gettext-minimal + pkg-config + swig-4.0 + unixodbc + zlib)) + (inputs (list bash-minimal + cairo + curl + glew + glm + hicolor-icon-theme + libngspice + libsm + libgit2 + libsecret + mesa + opencascade-occt + openssl + python-wrapper + gtk+ + wxwidgets-sans-egl + nng + python-wxpython + protobuf + gdk-pixbuf + (list zstd "lib"))) + (home-page "https://www.kicad.org/") + (synopsis "Electronics Design Automation Suite") + (description + "Kicad is a program for the formation of printed circuit +boards and electrical circuits. The software has a number of programs that +perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing +electrical diagrams), gerbview (viewing Gerber files) and others.") + (license license:gpl3+))) + +(define-public kicad-doc + (package + (name "kicad-doc") + (version (package-version kicad)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/services/kicad-doc.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "07g80p1igp8j3kh3qpmqd150i9950w1143yhncwik2ypccwjdfjy")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DBUILD_FORMATS=html") + #:tests? #f)) ;no test suite + (native-inputs (list asciidoc + gettext-minimal + git-minimal + perl + perl-unicode-linebreak + perl-yaml-tiny + po4a + ruby-asciidoctor/minimal + source-highlight)) + (home-page "https://kicad.org") + (synopsis "KiCad official documentation") + (description "This repository contains the official KiCad documentation.") + (license license:gpl3+))) + +(define-public kicad-symbols + (package + (name "kicad-symbols") + (version (package-version kicad)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/libraries/kicad-symbols.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08qb4rqxsyhrcvj1k200m2c06jjy7jwjmf9n1qkcm0biqqc5dba4")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f)) ; no tests exist + (home-page (package-home-page kicad)) + (synopsis "Official KiCad schematic symbol libraries") + (description "This package contains the official KiCad schematic symbol +libraries.") + ;; TODO: Exception: "To the extent that the creation of electronic designs + ;; that use 'Licensed Material' can be considered to be 'Adapted Material', + ;; then the copyright holder waives article 3 of the license with respect to + ;; these designs and any generated files which use data provided as part of + ;; the 'Licensed Material'." + ;; See . + (license license:cc-by-sa4.0))) + +(define-public kicad-footprints + (package + (inherit kicad-symbols) + (name "kicad-footprints") + (version (package-version kicad)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/libraries/kicad-footprints.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1w7dkb93s84ymi1syxpzacbmkxlnlh0k4z1c62nabspb901nn524")))) + (synopsis "Official KiCad footprint libraries") + (description "This package contains the official KiCad footprint libraries."))) + +(define-public kicad-packages3d + (package + (inherit kicad-symbols) + (name "kicad-packages3d") + (version (package-version kicad)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/libraries/kicad-packages3D.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1j26dmgz7xfixlqrzclb1wpc6zkd10n1fq7rmdrgwwx083p3c7a8")))) + (synopsis "Official KiCad 3D model libraries") + (description "This package contains the official KiCad 3D model libraries."))) + +(define-public kicad-templates + (package + (inherit kicad-symbols) + (name "kicad-templates") + (version (package-version kicad)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/libraries/kicad-templates.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zs29zn8qjgxv0w1vyr8yxmj02m8752zagn4vcraqgik46dwg2id")))) + (synopsis "Official KiCad project and worksheet templates") + (description "This package contains the official KiCad project and +worksheet templates."))) + (define-public lepton-eda (package (name "lepton-eda") diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 2ecaec5601..5808db4fe6 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -998,233 +998,6 @@ The viewer can be used interactively with a REPL (for example Geiser in Emacs).") (license license:gpl3+)))) -(define-public kicad - (package - (name "kicad") - (version "9.0.8") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/kicad/code/kicad.git") - (commit version))) - (sha256 - (base32 - "1b995p0qb9cjpj0n3x3szbqr6d7fxwmrp2nbx37y7ym2bc1lpxd8")) - (file-name (git-file-name name version)))) - (build-system cmake-build-system) - (arguments - `(#:out-of-source? #t - #:tests? #f ;no tests - #:build-type "Release" - #:configure-flags - ,#~(list "-DKICAD_SCRIPTING_PYTHON3=ON" - (string-append "-DOCC_INCLUDE_DIR=" - #$(this-package-input "opencascade-occt") - "/include/opencascade") - "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON" - "-DKICAD_USE_EGL=OFF" - "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE" - "-DCMAKE_BUILD_TYPE=RelWithDebInfo") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-ngspice-detection - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "eeschema/CMakeLists.txt" - (("NGSPICE_DLL_FILE=\"\\$\\{NGSPICE_DLL_FILE\\}\"") - (string-append "NGSPICE_DLL_FILE=\"" - (assoc-ref inputs "libngspice") - "/lib/libngspice.so\""))))) - (add-after 'install 'wrap-program - ;; Ensure correct Python at runtime. - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (python (assoc-ref inputs "python")) - (file (string-append out "/bin/kicad")) - (path (string-append out "/lib/python" - ,(version-major+minor (package-version - python)) - "/site-packages:" - (getenv "GUIX_PYTHONPATH")))) - (wrap-program file - `("GUIX_PYTHONPATH" ":" prefix - (,path)) - `("PATH" ":" prefix - (,(string-append python "/bin:")))))))))) - (native-search-paths - ;; Currently, KiCad environment variables are single-valued - ;; (see https://gitlab.com/kicad/code/kicad/-/issues/14792). - (list (search-path-specification - (variable "KICAD") ;to find kicad-doc - (files '("")) - (separator #f)) - (search-path-specification - (variable "KICAD9_TEMPLATE_DIR") - (files '("share/kicad/template")) - (separator #f)) - (search-path-specification - (variable "KICAD9_SYMBOL_DIR") - (files '("share/kicad/symbols")) - (separator #f)) - (search-path-specification - (variable "KICAD9_FOOTPRINT_DIR") - (files '("share/kicad/footprints")) - (separator #f)) - (search-path-specification - (variable "KICAD9_3DMODEL_DIR") - (files '("share/kicad/3dmodels")) - (separator #f)) - (search-path-specification - (variable "KICAD_STOCK_DATA_HOME") - (files '("share/kicad")) - (separator #f)))) - (native-inputs (list boost - desktop-file-utils - gettext-minimal - pkg-config - swig-4.0 - unixodbc - zlib)) - (inputs (list bash-minimal - cairo - curl - glew - glm - hicolor-icon-theme - libngspice - libsm - libgit2 - libsecret - mesa - opencascade-occt - openssl - python-wrapper - gtk+ - wxwidgets-sans-egl - nng - python-wxpython - protobuf - gdk-pixbuf - (list zstd "lib"))) - (home-page "https://www.kicad.org/") - (synopsis "Electronics Design Automation Suite") - (description - "Kicad is a program for the formation of printed circuit -boards and electrical circuits. The software has a number of programs that -perform specific functions, for example, pcbnew (Editing PCB), eeschema (editing -electrical diagrams), gerbview (viewing Gerber files) and others.") - (license license:gpl3+))) - -(define-public kicad-doc - (package - (name "kicad-doc") - (version (package-version kicad)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/kicad/services/kicad-doc.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "07g80p1igp8j3kh3qpmqd150i9950w1143yhncwik2ypccwjdfjy")))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags (list "-DBUILD_FORMATS=html") - #:tests? #f)) ;no test suite - (native-inputs (list asciidoc - gettext-minimal - git-minimal - perl - perl-unicode-linebreak - perl-yaml-tiny - po4a - ruby-asciidoctor/minimal - source-highlight)) - (home-page "https://kicad.org") - (synopsis "KiCad official documentation") - (description "This repository contains the official KiCad documentation.") - (license license:gpl3+))) - -(define-public kicad-symbols - (package - (name "kicad-symbols") - (version (package-version kicad)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/kicad/libraries/kicad-symbols.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "08qb4rqxsyhrcvj1k200m2c06jjy7jwjmf9n1qkcm0biqqc5dba4")))) - (build-system cmake-build-system) - (arguments - `(#:tests? #f)) ; no tests exist - (home-page (package-home-page kicad)) - (synopsis "Official KiCad schematic symbol libraries") - (description "This package contains the official KiCad schematic symbol -libraries.") - ;; TODO: Exception: "To the extent that the creation of electronic designs - ;; that use 'Licensed Material' can be considered to be 'Adapted Material', - ;; then the copyright holder waives article 3 of the license with respect to - ;; these designs and any generated files which use data provided as part of - ;; the 'Licensed Material'." - ;; See . - (license license:cc-by-sa4.0))) - -(define-public kicad-footprints - (package - (inherit kicad-symbols) - (name "kicad-footprints") - (version (package-version kicad)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/kicad/libraries/kicad-footprints.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1w7dkb93s84ymi1syxpzacbmkxlnlh0k4z1c62nabspb901nn524")))) - (synopsis "Official KiCad footprint libraries") - (description "This package contains the official KiCad footprint libraries."))) - -(define-public kicad-packages3d - (package - (inherit kicad-symbols) - (name "kicad-packages3d") - (version (package-version kicad)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/kicad/libraries/kicad-packages3D.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1j26dmgz7xfixlqrzclb1wpc6zkd10n1fq7rmdrgwwx083p3c7a8")))) - (synopsis "Official KiCad 3D model libraries") - (description "This package contains the official KiCad 3D model libraries."))) - -(define-public kicad-templates - (package - (inherit kicad-symbols) - (name "kicad-templates") - (version (package-version kicad)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/kicad/libraries/kicad-templates.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0zs29zn8qjgxv0w1vyr8yxmj02m8752zagn4vcraqgik46dwg2id")))) - (synopsis "Official KiCad project and worksheet templates") - (description "This package contains the official KiCad project and -worksheet templates."))) - (define-public librseq ;; There's no release. (let ((commit "c3ed6b64bbe1944bd8de8b9fde14e7c290f02a90")