summary refs log tree commit diff
path: root/gnu/packages/avr.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-04-06 19:11:33 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-04-06 19:11:33 +0200
commit51b8385acd6f7de668a994fe0523b3861240cd1a (patch)
tree5ccb000c26468ddd3c5c872bc7740439f669f4aa /gnu/packages/avr.scm
parent01d9859821c5df6cc76c59e48fddd3c8cfa88ff0 (diff)
downloadguix-51b8385acd6f7de668a994fe0523b3861240cd1a.tar.gz
gnu: avr-gcc: Use G-expression.
This is necessary because the GCC package uses G-expressions, so any
inheriting package that modifies build phases must also use them.

* gnu/packages/avr.scm (avr-gcc)[arguments]: Replace quasiquoting with
G-expression; remove trailing #T from build phases.
Diffstat (limited to 'gnu/packages/avr.scm')
-rw-r--r--gnu/packages/avr.scm55
1 files changed, 27 insertions, 28 deletions
diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index a741f183d7..44d6e0ebbb 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2023 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -24,6 +24,7 @@
 
 (define-module (gnu packages avr)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -52,34 +53,32 @@
       (arguments
        (substitute-keyword-arguments (package-arguments xgcc)
          ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((gcc (assoc-ref inputs  "gcc")))
-                   ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
-                   ;; prevent header conflict with the GCC from native-inputs.
-                   (setenv "CPLUS_INCLUDE_PATH"
-                           (string-join
-                            (delete (string-append gcc "/include/c++")
-                                    (string-split (getenv "CPLUS_INCLUDE_PATH")
-                                                  #\:))
-                            ":"))
-                   (format #t
-                           "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
-                           (getenv "CPLUS_INCLUDE_PATH"))
-                   #t)))
-             ;; Without a working multilib build, the resulting GCC lacks
-             ;; support for nearly every AVR chip.
-             (add-after 'unpack 'fix-genmultilib
-               (lambda _
-                 ;; patch-shebang doesn't work here because there are actually
-                 ;; several scripts inside this script, each with a #!/bin/sh
-                 ;; that needs patching.
-                 (substitute* "gcc/genmultilib"
-                   (("#!/bin/sh") (string-append "#!" (which "sh"))))
-                 #t))))
+          #~(modify-phases #$phases
+              (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((gcc (assoc-ref inputs  "gcc")))
+                    ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
+                    ;; prevent header conflict with the GCC from native-inputs.
+                    (setenv "CPLUS_INCLUDE_PATH"
+                            (string-join
+                             (delete (string-append gcc "/include/c++")
+                                     (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                   #\:))
+                             ":"))
+                    (format #t
+                            "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                            (getenv "CPLUS_INCLUDE_PATH")))))
+              ;; Without a working multilib build, the resulting GCC lacks
+              ;; support for nearly every AVR chip.
+              (add-after 'unpack 'fix-genmultilib
+                (lambda _
+                  ;; patch-shebang doesn't work here because there are actually
+                  ;; several scripts inside this script, each with a #!/bin/sh
+                  ;; that needs patching.
+                  (substitute* "gcc/genmultilib"
+                    (("#!/bin/sh") (string-append "#!" (which "sh"))))))))
          ((#:configure-flags flags)
-          `(delete "--disable-multilib" ,flags))))
+          #~(delete "--disable-multilib" #$flags))))
       (native-search-paths
        (list (search-path-specification
               (variable "CROSS_C_INCLUDE_PATH")