Paste number 306801: avr-gcc guix stuff

Paste number 306801: avr-gcc guix stuff
Pasted by: davexunit
When:5 years, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+6KQ9
Channel:None
Paste contents:
Raw Source | XML | Display As
From 2014865b415fd25ce43cc968dbe8d7747680289e Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Sat, 18 Jul 2015 07:50:32 -0400
Subject: [PATCH] gnu: Create public packages for AVR versions of GCC and
 binutils.

* gnu/packages/avr.scm (avr-binutils, avr-gcc): New variables.
  (avr-libc): Use avr-binutils and avr-gcc as inputs.
---
 gnu/packages/avr.scm | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index d59816b..cb3f9b0 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,24 @@
   #:use-module (gnu packages vim)
   #:use-module (gnu packages zip))
 
+(define-public avr-binutils
+  (package
+    (inherit (cross-binutils "avr"))
+    (name "avr-binutils")
+    (synopsis "Binutils for Atmel AVR binaries")))
+
+(define-public avr-gcc
+  (package (inherit xgcc-avr)
+    (name "avr-gcc")
+    (synopsis "GNU Compiler Collection for Atmel AVR microcontrollers")
+    (native-search-paths
+     (list (search-path-specification
+            (variable "CROSS_CPATH")
+            (files '("avr/include")))
+           (search-path-specification
+            (variable "CROSS_LIBRARY_PATH")
+            (files '("avr/lib")))))))
+
 (define-public avr-libc
   (package
     (name "avr-libc")
@@ -44,8 +63,8 @@
      `(#:out-of-source? #t
        #:configure-flags '("--host=avr")))
 
-    (native-inputs `(("cross-binutils" ,(cross-binutils "avr"))
-                     ("cross-gcc" ,xgcc-avr)))
+    (native-inputs `(("avr-binutils" ,avr-binutils)
+                     ("avr-gcc" ,avr-gcc)))
     (home-page "http://www.nongnu.org/avr-libc/")
     (synopsis "The AVR C Library")
     (description
-- 
2.6.3

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.