Add wiringpi package
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
(define-module (nathanmcrae packages)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages commencement)
|
||||
#:use-module (gnu packages crypto)
|
||||
#:use-module (gnu packages curl)
|
||||
#:use-module (gnu packages golang)
|
||||
#:use-module (gnu packages golang-build)
|
||||
@@ -74,3 +75,64 @@ not permute arguments. It is intended as a replacement for Go's flag package.")
|
||||
(description "passphrase2pgp generates, in OpenPGP format, an EdDSA signing key and Curve25519 encryption subkey entirely from a passphrase, essentially allowing you to store a backup of your PGP keys in your brain. At any time you can re-run the tool and re-enter the passphrase to reproduce the original keys.")
|
||||
(license unlicense)
|
||||
(home-page "https://github.com/skeeto/passphrase2pgp")))
|
||||
|
||||
(define-public wiringpi
|
||||
(package
|
||||
(name "wiringpi")
|
||||
(version "3.18")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/WiringPi/WiringPi.git")
|
||||
(commit "3.18")))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0556n8f8j0920b4l7jamwx2j7c6h13b2fm3hny1islclgngf8c7g"))))
|
||||
(native-inputs (list libxcrypt))
|
||||
(propagated-inputs (list libxcrypt))
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "LIBRARY_PATH")
|
||||
(files (list "include")))
|
||||
(search-path-specification
|
||||
(variable "LD_LIBRARY_PATH")
|
||||
(files (list "lib")))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(delete 'check)
|
||||
(delete 'install)
|
||||
(replace 'build
|
||||
(lambda* (#:key tests? ints outputs #:allow-other-keys)
|
||||
(use-modules (ice-9 ftw))
|
||||
(let* ((out-dir (assoc-ref outputs "out"))
|
||||
(versioned-so (string-append "libwiringPi.so."
|
||||
#$version))
|
||||
(versioned-so-path (string-append out-dir "/lib/" versioned-so))
|
||||
(so-path (string-append out-dir "/lib/libwiringPi.so")))
|
||||
(with-directory-excursion "wiringPi"
|
||||
; Otherwise the makefile will default to using cc
|
||||
(setenv "CC" "gcc")
|
||||
(invoke "make")
|
||||
; TODO: move to install phase
|
||||
(install-file (string-append "libwiringPi.so."
|
||||
#$version)
|
||||
(string-append out-dir "/lib"))
|
||||
(invoke "ln" versioned-so-path so-path)
|
||||
(for-each (lambda (file)
|
||||
(display file)
|
||||
(install-file file
|
||||
(string-append out-dir "/include")))
|
||||
(find-files "." "\\.h$"))
|
||||
|
||||
(install-file "wiringPi.h"
|
||||
(string-append out-dir "/include")))))))))
|
||||
(home-page "https://github.com/WiringPi/WiringPi")
|
||||
(synopsis "The arguably fastest GPIO Library for the Raspberry Pi")
|
||||
(description
|
||||
"The WiringPi Library is a highly performant GPIO access library for Raspberry Pi boards. This library is written in C and is designed to provide fast and efficient control of the GPIO pins by directly accessing the hardware registers using DMA.")
|
||||
(license lgpl3)))
|
||||
|
||||
Reference in New Issue
Block a user