@@ -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+))))