summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2026-06-28 11:17:48 +0300
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-07-02 16:19:56 +0100
commitfdf41d0a25cdea74a5a7687c53b6d4065f2048c6 (patch)
treef723ff03c19b43e75f713f6d4490a494e8e46e67 /gnu
parentbdef240e9c60b1f7d2b5ac87323332b03e71cc2b (diff)
gnu: arduino-cli: Install shell completions.
* gnu/packages/engineering.scm (arduino-cli)[arguments]: Add a phase to generate the shell completions. [native-inputs]: Add this-package when cross-compiling. Merges: guix/guix!9583 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/engineering.scm111
1 files changed, 69 insertions, 42 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 58f1c256121..cd4acc0bb73 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1551,6 +1551,10 @@ language, ADMS transforms Verilog-AMS code into other target languages.")
1551 (list 1551 (list
1552 #:go go-1.26 1552 #:go go-1.26
1553 #:install-source? #f 1553 #:install-source? #f
1554 #:modules
1555 '((guix build go-build-system)
1556 (guix build utils)
1557 (ice-9 match))
1554 #:import-path "github.com/arduino/arduino-cli" 1558 #:import-path "github.com/arduino/arduino-cli"
1555 #:build-flags 1559 #:build-flags
1556 #~(let ((base "github.com/arduino/arduino-cli/internal/")) 1560 #~(let ((base "github.com/arduino/arduino-cli/internal/"))
@@ -1601,49 +1605,72 @@ language, ADMS transforms Verilog-AMS code into other target languages.")
1601 "internal/cli/lib" 1605 "internal/cli/lib"
1602 "internal/cli/monitor" 1606 "internal/cli/monitor"
1603 "internal/orderedmap" 1607 "internal/orderedmap"
1604 "pkg/fqbn"))) 1608 "pkg/fqbn")
1609 #:phases
1610 #~(modify-phases %standard-phases
1611 (add-after 'install 'install-shell-completions
1612 (lambda* (#:key native-inputs #:allow-other-keys)
1613 (for-each
1614 (match-lambda
1615 ((shell . path)
1616 (mkdir-p (in-vicinity #$output (dirname path)))
1617 (let ((binary
1618 (if #$(%current-target-system)
1619 (search-input-file native-inputs "bin/arduino-cli")
1620 (in-vicinity #$output "bin/arduino-cli"))))
1621 (with-output-to-file (in-vicinity #$output path)
1622 (lambda _
1623 (setenv "HOME" (getcwd))
1624 (invoke binary "completion" shell))))))
1625 '(("bash" . "share/bash-completion/completions/arduino-cli")
1626 ("fish" . "share/fish/vendor_completions.d/arduino-cli.fish")
1627 ("zsh" . "share/zsh/site-functions/_arduino-cli"))))))))
1605 (native-inputs 1628 (native-inputs
1606 (list go-fortio-org-safecast 1629 (append
1607 go-github-com-arduino-go-paths-helper 1630 (if (%current-target-system)
1608 go-github-com-arduino-go-properties-orderedmap 1631 (list this-package)
1609 go-github-com-arduino-go-serial-utils 1632 '())
1610 go-github-com-arduino-go-timeutils 1633 (list go-fortio-org-safecast
1611 go-github-com-arduino-go-win32-utils 1634 go-github-com-arduino-go-paths-helper
1612 go-github-com-arduino-pluggable-discovery-protocol-handler 1635 go-github-com-arduino-go-properties-orderedmap
1613 go-github-com-arduino-pluggable-monitor-protocol-handler 1636 go-github-com-arduino-go-serial-utils
1614 go-github-com-cmaglie-pb 1637 go-github-com-arduino-go-timeutils
1615 go-github-com-codeclysm-extract 1638 go-github-com-arduino-go-win32-utils
1616 go-github-com-djherbis-buffer 1639 go-github-com-arduino-pluggable-discovery-protocol-handler
1617 go-github-com-djherbis-nio 1640 go-github-com-arduino-pluggable-monitor-protocol-handler
1618 go-github-com-fatih-color 1641 go-github-com-cmaglie-pb
1619 go-github-com-go-git-go-git-v5 1642 go-github-com-codeclysm-extract
1620 go-github-com-gofrs-uuid-v5 1643 go-github-com-djherbis-buffer
1621 go-github-com-leonelquinteros-gotext 1644 go-github-com-djherbis-nio
1622 go-github-com-marcinbor85-gohex 1645 go-github-com-fatih-color
1623 go-github-com-mattn-go-colorable 1646 go-github-com-go-git-go-git-v5
1624 go-github-com-mattn-go-isatty 1647 go-github-com-gofrs-uuid-v5
1625 go-github-com-protonmail-go-crypto 1648 go-github-com-leonelquinteros-gotext
1626 go-github-com-rifflock-lfshook 1649 go-github-com-marcinbor85-gohex
1627 go-github-com-rogpeppe-go-internal 1650 go-github-com-mattn-go-colorable
1628 go-github-com-schollz-closestmatch 1651 go-github-com-mattn-go-isatty
1629 go-github-com-sirupsen-logrus 1652 go-github-com-protonmail-go-crypto
1630 go-github-com-spf13-cobra 1653 go-github-com-rifflock-lfshook
1631 go-github-com-spf13-viper 1654 go-github-com-rogpeppe-go-internal
1632 go-github-com-stretchr-testify 1655 go-github-com-schollz-closestmatch
1633 go-github-com-xeipuuv-gojsonschema 1656 go-github-com-sirupsen-logrus
1634 go-go-bug-st-cleanup 1657 go-github-com-spf13-cobra
1635 go-go-bug-st-downloader 1658 go-github-com-spf13-viper
1636 go-go-bug-st-f 1659 go-github-com-stretchr-testify
1637 go-go-bug-st-relaxed-semver 1660 go-github-com-xeipuuv-gojsonschema
1638 go-go-bug-st-testifyjson 1661 go-go-bug-st-cleanup
1639 go-golang-org-x-sys 1662 go-go-bug-st-downloader
1640 go-golang-org-x-term 1663 go-go-bug-st-f
1641 go-golang-org-x-text 1664 go-go-bug-st-relaxed-semver
1642 go-google-golang-org-genproto-googleapis-rpc 1665 go-go-bug-st-testifyjson
1643 go-google-golang-org-grpc 1666 go-golang-org-x-sys
1644 go-google-golang-org-protobuf 1667 go-golang-org-x-term
1645 go-gopkg-in-yaml-v3 1668 go-golang-org-x-text
1646 go-github-com-mailru-easyjson)) 1669 go-google-golang-org-genproto-googleapis-rpc
1670 go-google-golang-org-grpc
1671 go-google-golang-org-protobuf
1672 go-gopkg-in-yaml-v3
1673 go-github-com-mailru-easyjson)))
1647 (home-page "https://github.com/arduino/arduino-cli") 1674 (home-page "https://github.com/arduino/arduino-cli")
1648 (synopsis "Tools to manage Arduino compatible boards") 1675 (synopsis "Tools to manage Arduino compatible boards")
1649 (description 1676 (description