[PATCH 0/4] Three KiCad color themes

  • Open
  • quality assurance status badge
Details
3 participants
  • Mathieu Othacehe
  • peter
  • Steve George
Owner
unassigned
Submitted by
peter
Severity
normal
P
(address . guix-patches@gnu.org)(name . Peter Polidoro)(address . peter@polidoro.io)
cover.1696967309.git.peter@polidoro.io
From: Peter Polidoro <peter@polidoro.io>

These are three color theme packages for KiCad. More can easily be added later if this approach is deemed acceptable.

These packages are installed using the KICAD7_3RD_PARTY environment variable and that search path has been added to the kicad package.

Using the 3rd party environment variable makes it easy to install plug-ins and color themes in Guix without modifying the kicad source code. The disadvantage of using this environment variable is that it makes the 3rd party installation directory write only inside the store so the KiCad Plugin and Content Manager can no longer be used inside of KiCad for installing 3rd party add-ons if any Guix add-on package is installed into the Guix profile.

An alternative approach would be to modify the kicad source code within the Guix kicad package so that another environment variable could be used for installing Guix kicad add-on packages, allowing the KiCad Plugin and Content Manager to be used at the same time, installing files into the user's home directory.

Since most Guix users want a reproducible software environment it seems reasonable that they might want all add-on software to be installed using Guix packages rather than a combination of Guix packages and local files using the KiCad Plugin and Content manager, especially after all of the common color themes and plugins have been packaged in Guix.

Peter Polidoro (4):
gnu: kicad: Add 3rdparty search path.
gnu: Add kicad-color-theme-behave-dark.
gnu: Add kicad-color-theme-solarized-dark.
gnu: Add kicad-color-theme-solarized-light.

gnu/packages/engineering.scm | 95 +++++++++++++++++++++++++++++++++++-
1 file changed, 94 insertions(+), 1 deletion(-)

--
2.41.0
P
[PATCH 1/4] gnu: kicad: Add 3rdparty search path.
(address . 66453@debbugs.gnu.org)(name . Peter Polidoro)(address . peter@polidoro.io)
ada8e734a559ce1bd207c3c455148ad229b22ef0.1696967309.git.peter@polidoro.io
From: Peter Polidoro <peter@polidoro.io>

* gnu/packages/engineering.scm (kicad): Add 3rdparty search path.
---
gnu/packages/engineering.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index c9aec482da..cad419ef70 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1155,7 +1155,14 @@ (define-public kicad
(files '("share/kicad/footprints")))
(search-path-specification
(variable "KICAD7_3DMODEL_DIR")
- (files '("share/kicad/3dmodels")))))
+ (files '("share/kicad/3dmodels")))
+ ;; Using the following environment variable removes write access to
+ ;; the KiCad Plugin and Content Manager directory so using any Guix
+ ;; plugin or color theme packages requires all plugin or color
+ ;; themes to be installed using Guix packages
+ (search-path-specification
+ (variable "KICAD7_3RD_PARTY")
+ (files '("share/kicad/3rdparty")))))
(native-inputs (list boost
desktop-file-utils
gettext-minimal
--
2.41.0
P
[PATCH 3/4] gnu: Add kicad-color-theme-solarized-dark.
(address . 66453@debbugs.gnu.org)(name . Peter Polidoro)(address . peter@polidoro.io)
6518bb3297590fab0c859194ecee1a5ad49552af.1696967309.git.peter@polidoro.io
From: Peter Polidoro <peter@polidoro.io>

* gnu/packages/engineering.scm (kicad-color-theme-solarized-dark): New variable.
---
gnu/packages/engineering.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index ba0181479d..4564298a55 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1337,6 +1337,35 @@ (define-public kicad-color-theme-behave-dark
(description "This package provides a KiCad dark color theme based on the Atom behave theme.")
(license license:cc0))))
+(define-public kicad-color-theme-solarized-dark
+ (let ((commit "68ea0402f334bdbae175f6ca924743640c07183d"))
+ (package
+ (name "kicad-color-theme-solarized-dark")
+ (version "1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pointhi/kicad-color-schemes.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1viqfq13ch6xpfhs58vh9b7q1xcwqscczr7lsv220cxr48xhb21x"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan
+ #~'(("solarized-dark/solarized-dark.json" "share/kicad/3rdparty/colors/solarized-dark/solarized-dark.json"))
+ #:modules '(((guix build gnu-build-system) #:prefix gnu:)
+ (guix build copy-build-system)
+ (guix build utils)
+ (ice-9 match))))
+ (home-page "https://github.com/pointhi/kicad-color-schemes")
+ (synopsis "Solarized dark theme for KiCad")
+ (description "This package provides a KiCad dark color theme based on Ethan Schoonover’s
+Solarized color scheme.")
+ (license license:cc0))))
+
(define-public librseq
;; There's no release.
(let ((commit "170f840b498e1aff068b90188727a656111bfc2f")
--
2.41.0
P
[PATCH 2/4] gnu: Add kicad-color-theme-behave-dark.
(address . 66453@debbugs.gnu.org)(name . Peter Polidoro)(address . peter@polidoro.io)
7fbd4f68a5afe2bdac5090428fa320a777eba0cb.1696967309.git.peter@polidoro.io
From: Peter Polidoro <peter@polidoro.io>

* gnu/packages/engineering.scm (kicad-color-theme-behave-dark): New variable.
---
gnu/packages/engineering.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index cad419ef70..ba0181479d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1309,6 +1309,34 @@ (define-public kicad-templates
(description "This package contains the official KiCad project and
worksheet templates.")))
+(define-public kicad-color-theme-behave-dark
+ (let ((commit "68ea0402f334bdbae175f6ca924743640c07183d"))
+ (package
+ (name "kicad-color-theme-behave-dark")
+ (version "1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pointhi/kicad-color-schemes.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1viqfq13ch6xpfhs58vh9b7q1xcwqscczr7lsv220cxr48xhb21x"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan
+ #~'(("behave-dark/behave-dark.json" "share/kicad/3rdparty/colors/behave-dark/behave-dark.json"))
+ #:modules '(((guix build gnu-build-system) #:prefix gnu:)
+ (guix build copy-build-system)
+ (guix build utils)
+ (ice-9 match))))
+ (home-page "https://github.com/pointhi/kicad-color-schemes")
+ (synopsis "Behave dark theme for KiCad")
+ (description "This package provides a KiCad dark color theme based on the Atom behave theme.")
+ (license license:cc0))))
+
(define-public librseq
;; There's no release.
(let ((commit "170f840b498e1aff068b90188727a656111bfc2f")
--
2.41.0
P
[PATCH 4/4] gnu: Add kicad-color-theme-solarized-light.
(address . 66453@debbugs.gnu.org)(name . Peter Polidoro)(address . peter@polidoro.io)
5d10236e9ee440500d2a9385f63ed5d352e1ab41.1696967309.git.peter@polidoro.io
From: Peter Polidoro <peter@polidoro.io>

* gnu/packages/engineering.scm (kicad-color-theme-solarized-light): New variable.
---
gnu/packages/engineering.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4564298a55..bc87fdb286 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1366,6 +1366,35 @@ (define-public kicad-color-theme-solarized-dark
Solarized color scheme.")
(license license:cc0))))
+(define-public kicad-color-theme-solarized-light
+ (let ((commit "68ea0402f334bdbae175f6ca924743640c07183d"))
+ (package
+ (name "kicad-color-theme-solarized-light")
+ (version "1.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pointhi/kicad-color-schemes.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1viqfq13ch6xpfhs58vh9b7q1xcwqscczr7lsv220cxr48xhb21x"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan
+ #~'(("solarized-light/solarized-light.json" "share/kicad/3rdparty/colors/solarized-light/solarized-light.json"))
+ #:modules '(((guix build gnu-build-system) #:prefix gnu:)
+ (guix build copy-build-system)
+ (guix build utils)
+ (ice-9 match))))
+ (home-page "https://github.com/pointhi/kicad-color-schemes")
+ (synopsis "Solarized light theme for KiCad")
+ (description "This package provides a KiCad light color theme based on Ethan Schoonover’s
+Solarized color scheme.")
+ (license license:cc0))))
+
(define-public librseq
;; There's no release.
(let ((commit "170f840b498e1aff068b90188727a656111bfc2f")
--
2.41.0
M
M
Mathieu Othacehe wrote on 25 Oct 2023 10:11
Re: [bug#66453] [PATCH 0/4] Three KiCad color themes
(address . peter@polidoro.io)(address . 66453@debbugs.gnu.org)
87fs1znmti.fsf@gnu.org
Hello,

Thanks for this patch, it seems to work fine! I think it is acceptable
to force extension installation through Guix.

As a general remark some lines are too long, this is reported by the

On Github the version is 2021-12-05, so the packages with the 1.2
version are flagged as updatable:

Toggle snippet (3 lines)
gnu/packages/engineering.scm:1346:15: kicad-color-theme-solarized-dark@1.2: can be upgraded to 2021.12.05

You can also remove the '.git' suffix in `url` in git-reference:

Toggle snippet (3 lines)
gnu/packages/engineering.scm:1378:7: kicad-color-theme-solarized-light@1.2: permanent redirect from https://github.com/pointhi/kicad-color-schemes.git to https://github.com/pointhi/kicad-color-schemes

Finally do you think it would be possible to package all the supported
color themes in a single package?

Thanks,

Mathieu
P
P
Peter Polidoro wrote on 31 Oct 2023 15:50
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 66453@debbugs.gnu.org)
87edha261f.fsf@polidoro.io
Hello,

I have been told by KiCad developers that the KICAD7_3RD_PARTY
environment variable is not intended to be used for this purpose,
since the directory pointed to by KICAD7_3RD_PARTY needs
read/write privileges.

I need to submit a feature request to the KiCad developers to
allow colors to be installed into a system directory, so I need to
place this patch series on hold until that request is handled.

I may also need to request that they add another environment
variable for KiCad to search the profile directory for plugins,
although this may happen automatically.

I am going to create a package for a plugin to see if that works
before returning to this patch series.

Thank you!

Mathieu Othacehe <othacehe@gnu.org> writes:

Toggle quote (39 lines)
> [1. text/plain]
>
> Hello,
>
> Thanks for this patch, it seems to work fine! I think it is
> acceptable
> to force extension installation through Guix.
>
> As a general remark some lines are too long, this is reported by
> the
> linter: https://qa.guix.gnu.org/issue/66453.
>
> On Github the version is 2021-12-05, so the packages with the
> 1.2
> version are flagged as updatable:
>
> [2. text/x-verbatim]
> gnu/packages/engineering.scm:1346:15:
> kicad-color-theme-solarized-dark@1.2: can be upgraded to
> 2021.12.05
>
> [3. text/plain]
>
> You can also remove the '.git' suffix in `url` in git-reference:
>
> [4. text/x-verbatim]
> gnu/packages/engineering.scm:1378:7:
> kicad-color-theme-solarized-light@1.2: permanent redirect from
> https://github.com/pointhi/kicad-color-schemes.git to
> https://github.com/pointhi/kicad-color-schemes
>
> [5. text/plain]
> Finally do you think it would be possible to package all the
> supported
> color themes in a single package?
>
> Thanks,
>
> Mathieu
S
S
Steve George wrote on 5 Mar 13:47 +0100
Re: [bug#66453] [PATCH 1/4] gnu: kicad: Add 3rdparty search path.
(address . peter@polidoro.io)(address . 66453@debbugs.gnu.org)
ZecUaUxoB3lkMkK9@t25sg
Hi,

Were you ever able to resolve the directory to use for these themes?

If not, is there another option, or should we close :-(

Thanks,

Steve


On 10 Oct, peter@polidoro.io wrote:
Toggle quote (33 lines)
> From: Peter Polidoro <peter@polidoro.io>
>
> * gnu/packages/engineering.scm (kicad): Add 3rdparty search path.
> ---
> gnu/packages/engineering.scm | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index c9aec482da..cad419ef70 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -1155,7 +1155,14 @@ (define-public kicad
> (files '("share/kicad/footprints")))
> (search-path-specification
> (variable "KICAD7_3DMODEL_DIR")
> - (files '("share/kicad/3dmodels")))))
> + (files '("share/kicad/3dmodels")))
> + ;; Using the following environment variable removes write access to
> + ;; the KiCad Plugin and Content Manager directory so using any Guix
> + ;; plugin or color theme packages requires all plugin or color
> + ;; themes to be installed using Guix packages
> + (search-path-specification
> + (variable "KICAD7_3RD_PARTY")
> + (files '("share/kicad/3rdparty")))))
> (native-inputs (list boost
> desktop-file-utils
> gettext-minimal
> --
> 2.41.0
>
>
>
>
P
P
Peter Polidoro wrote on 5 Mar 16:47 +0100
(name . Steve George)(address . steve@futurile.net)(address . 66453@debbugs.gnu.org)
875xy065kc.fsf@polidoro.io
This is still an open issue on the KiCad repository.

I have been told it is an easy feature for them to add and I was
hoping it would be included in KiCad 8, but it has not been
included yet.

You can close this for now and then I can resubmit someday if they
ever get around to adding the new environment variable. Thanks!


Steve George <steve@futurile.net> writes:

Toggle quote (13 lines)
> Hi,
>
> Were you ever able to resolve the directory to use for these
> themes?
>
> If not, is there another option, or should we close :-(
>
> Thanks,
>
> Steve
>
>
> On 10 Oct, peter@polidoro.io wrote:
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 66453@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 66453
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch