Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / avr.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
3 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages avr)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages cross-base)
27 #:use-module (gnu packages vim)
28 #:use-module (gnu packages zip))
29
30 (define-public avr-libc
31 (package
32 (name "avr-libc")
33 (version "1.8.1")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append
37 "mirror://savannah//avr-libc/avr-libc-"
38 version ".tar.bz2"))
39 (sha256
40 (base32
41 "0sd9qkvhmk9av4g1f8dsjwc309hf1g0731bhvicnjb3b3d42l1n3"))))
42 (build-system gnu-build-system)
43 (arguments
44 `(#:out-of-source? #t
45 #:configure-flags '("--host=avr")))
46
47 (native-inputs `(("cross-binutils" ,(cross-binutils "avr"))
48 ("cross-gcc" ,xgcc-avr)))
49 (home-page "http://www.nongnu.org/avr-libc/")
50 (synopsis "The AVR C Library")
51 (description
52 "AVR Libc is a project whose goal is to provide a high quality C library
53 for use with GCC on Atmel AVR microcontrollers.")
54 (license (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))
55
56 (define-public microscheme
57 (package
58 (name "microscheme")
59 (version "0.9.2")
60 (source (origin
61 (method url-fetch)
62 (uri (string-append "https://github.com/ryansuchocki/"
63 "microscheme/archive/v" version ".zip"))
64 (sha256
65 (base32
66 "0cmp1c6ilcib4w9ysqghav310g8jsq9gdfpfa9sd23wgl7mlncxf"))
67 (file-name (string-append name "-" version ".zip"))))
68 (build-system gnu-build-system)
69 (arguments
70 `(#:parallel-build? #f ; fails to build otherwise
71 #:tests? #f ; no tests
72 #:phases
73 (modify-phases %standard-phases
74 (delete 'configure))
75 #:make-flags
76 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
77 (native-inputs
78 `(("unzip" ,unzip)
79 ("vim" ,vim))) ; for xxd
80 (home-page "http://microscheme.org/")
81 (synopsis "Scheme subset for Atmel microcontrollers")
82 (description
83 "Microscheme, or @code{(ms)} for short, is a functional programming
84 language for the Arduino, and for Atmel 8-bit AVR microcontrollers in general.
85 Microscheme is a subset of Scheme, in the sense that every valid @code{(ms)}
86 program is also a valid Scheme program (with the exception of Arduino
87 hardware-specific primitives). The @code{(ms)} compiler performs function
88 inlining, and features an aggressive tree-shaker, eliminating unused top-level
89 definitions. Microscheme has a robust @dfn{Foreign Function Interface} (FFI)
90 meaning that C code may be invoked directly from (ms) programs.")
91 (license license:expat)))