unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#60349] [PATCH] gnu: Add waveshare-dtoverlays.
@ 2022-12-27  5:27 Maxim Cournoyer
  2023-01-03 15:10 ` [bug#60349] [PATCH v2] " Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Cournoyer @ 2022-12-27  5:27 UTC (permalink / raw)
  To: 60349; +Cc: Maxim Cournoyer

* gnu/packages/raspberry-pi.scm (waveshare-dtoverlays): New variable.
---

 gnu/packages/raspberry-pi.scm | 40 +++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index c0a2cb5bf2..ad28033bf3 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -455,3 +455,43 @@ (define keep '("." ".."
 flash a memory card with an operating system image suitable for the Raspberry
 Pi single board computer.")
     (license license:asl2.0)))
+
+(define-public waveshare-dtoverlays
+  (let ((commit "5c43994b70e23c2bf9f9a448ef873e246b076bdb")
+        (revision "0"))
+    (package
+      (name "waveshare-dtoverlays")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/swkim01/waveshare-dtoverlays")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (modules '((guix build utils)))
+                ;; Delete pre-compiled device tree overlay binary files.
+                (snippet '(for-each delete-file (find-files "." "\\.dtbo$")))
+                (sha256
+                 (base32
+                  "14714zb4p0y58mjgky0xpqd78hb1kjykr93hq15yxsnji0w47zj4"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-before 'install 'build
+              (lambda _
+                (for-each (lambda (f)
+                            (invoke "dtc" "-@" "-I" "dts" "-O" "dtb"
+                                    "-o" (string-append (basename f ".dts")
+                                                        ".dtbo")
+                                    f))
+                          (find-files "." "\\.dts")))))
+        #:install-plan #~'(("." "" #:include-regexp ("\\.dtbo$")))))
+      (native-inputs (list dtc))
+      (home-page "https://github.com/swkim01/waveshare-dtoverlays/")
+      (synopsis "Device tree overlays for WaveShare SpotPear TFT LCDs")
+      (description "This package contains device tree overlay binaries to
+support the WaveShare SpotPear @acronym{TFT, Thin-Film Transistor}
+@acronym{LCDs, Liquid Crystal Display} on the Raspberry Pi.")
+      (license license:gpl3+))))

base-commit: 60d4652c5d33dd81ed05afd708e6a127584d59cd
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#60349] [PATCH v2] gnu: Add waveshare-dtoverlays.
  2022-12-27  5:27 [bug#60349] [PATCH] gnu: Add waveshare-dtoverlays Maxim Cournoyer
@ 2023-01-03 15:10 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2023-01-03 15:10 UTC (permalink / raw)
  To: 60349; +Cc: Maxim Cournoyer

* gnu/packages/raspberry-pi.scm (waveshare-dtoverlays): New variable.

---

Changes in v2:
- Update commit, switch to gnu-build-system and streamline definition

 gnu/packages/raspberry-pi.scm | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm
index c0a2cb5bf2..8b809c18d3 100644
--- a/gnu/packages/raspberry-pi.scm
+++ b/gnu/packages/raspberry-pi.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2021 Stefan <stefan-guix@vodafonemail.de>
-;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -455,3 +455,35 @@ (define keep '("." ".."
 flash a memory card with an operating system image suitable for the Raspberry
 Pi single board computer.")
     (license license:asl2.0)))
+
+(define-public waveshare-dtoverlays
+  (let ((commit "6ea99d4afb4776fdb008708f3f30df1de6fc24e3")
+        (revision "0"))
+    (package
+      (name "waveshare-dtoverlays")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/swkim01/waveshare-dtoverlays")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (modules '((guix build utils)))
+                ;; Delete pre-compiled device tree overlay binary files.
+                (snippet '(for-each delete-file (find-files "." "\\.dtbo$")))
+                (sha256
+                 (base32
+                  "1c30wnlinicwlivlri25wns6x8nx7asf5fh2zqxkzr9h1jsxbzwz"))))
+      (build-system gnu-build-system)
+      (arguments (list #:tests? #f      ;no test suite
+                       #:make-flags #~(list (string-append "PREFIX="
+                                                           #$output))
+                       #:phases #~(modify-phases %standard-phases
+                                    (delete 'configure))))
+      (native-inputs (list dtc))
+      (home-page "https://github.com/swkim01/waveshare-dtoverlays/")
+      (synopsis "Device tree overlays for WaveShare SpotPear TFT LCDs")
+      (description "This package contains device tree overlay binaries to
+support the WaveShare SpotPear @acronym{TFT, Thin-Film Transistor}
+@acronym{LCDs, Liquid Crystal Display} on the Raspberry Pi.")
+      (license license:gpl3+))))

base-commit: f84f676404d90b3e8df1e1c79d186eaf1ca9b88a
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-03 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27  5:27 [bug#60349] [PATCH] gnu: Add waveshare-dtoverlays Maxim Cournoyer
2023-01-03 15:10 ` [bug#60349] [PATCH v2] " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).