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>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
30 (define-public avr-libc
37 "mirror://savannah//avr-libc/avr-libc-"
41 "0sd9qkvhmk9av4g1f8dsjwc309hf1g0731bhvicnjb3b3d42l1n3"))))
42 (build-system gnu-build-system)
45 #:configure-flags '("--host=avr")))
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")
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"))))
56 (define-public microscheme
62 (uri (string-append "https://github.com/ryansuchocki/"
63 "microscheme/archive/v" version ".zip"))
66 "0cmp1c6ilcib4w9ysqghav310g8jsq9gdfpfa9sd23wgl7mlncxf"))
67 (file-name (string-append name "-" version ".zip"))))
68 (build-system gnu-build-system)
70 `(#:parallel-build? #f ; fails to build otherwise
71 #:tests? #f ; no tests
73 (modify-phases %standard-phases
76 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
79 ("vim" ,vim))) ; for xxd
80 (home-page "http://microscheme.org/")
81 (synopsis "Scheme subset for Atmel microcontrollers")
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)))