From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52808) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9aLE-00041b-GB for guix-patches@gnu.org; Wed, 04 Mar 2020 15:10:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9aLD-0000B3-B9 for guix-patches@gnu.org; Wed, 04 Mar 2020 15:10:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9aLC-00009D-Ee for guix-patches@gnu.org; Wed, 04 Mar 2020 15:10:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j9aLC-0006uT-9N for guix-patches@gnu.org; Wed, 04 Mar 2020 15:10:02 -0500 Subject: [bug#39918] [PATCH 2/2] gnu: avr-toolchain: Replace functions with package variables. Resent-Message-ID: From: Arun Isaac Date: Thu, 5 Mar 2020 01:39:45 +0530 Message-Id: <20200304200945.6657-2-arunisaac@systemreboot.net> In-Reply-To: <20200304200945.6657-1-arunisaac@systemreboot.net> References: <20200304200945.6657-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39918@debbugs.gnu.org Cc: dannym@scratchpost.org, Arun Isaac , ekaitz@elenq.tech * gnu/packages/avr.scm (avr-gcc-7): Rename to avr-gcc. (avr-libc): Replace function with variable. (avr-toolchain): Replace function with variable. --- gnu/packages/avr.scm | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index 8a964b9b17..e6f8c36bd1 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -41,8 +41,8 @@ (inherit (cross-binutils "avr")) (name "avr-binutils"))) -(define-public avr-gcc-7 - (let ((xgcc (cross-gcc "avr" #:xgcc gcc-7 #:xbinutils avr-binutils))) +(define avr-gcc + (let ((xgcc (cross-gcc "avr" #:xgcc gcc #:xbinutils avr-binutils))) (package (inherit xgcc) (name "avr-gcc") @@ -79,10 +79,10 @@ (variable "CROSS_LIBRARY_PATH") (files '("avr/lib"))))) (native-inputs - `(("gcc" ,gcc-7) + `(("gcc" ,gcc) ,@(package-native-inputs xgcc)))))) -(define (avr-libc avr-gcc) +(define avr-libc (package (name "avr-libc") (version "2.0.0") @@ -107,30 +107,27 @@ for use with GCC on Atmel AVR microcontrollers.") (license (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt")))) -(define (avr-toolchain avr-gcc) +(define-public avr-toolchain ;; avr-libc checks the compiler version and passes "--enable-device-lib" for avr-gcc > 5.1.0. ;; It wouldn't install the library for atmega32u4 etc if we didn't use the corret avr-gcc. - (let ((avr-libc (avr-libc avr-gcc))) - (package - (name "avr-toolchain") - (version (package-version avr-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("avrdude" ,avrdude) - ("binutils" ,avr-binutils) - ("gcc" ,avr-gcc) - ("libc" ,avr-libc))) - (synopsis "Complete GCC tool chain for AVR microcontroller development") - (description "This package provides a complete GCC tool chain for AVR + (package + (name "avr-toolchain") + (version (package-version avr-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("avrdude" ,avrdude) + ("binutils" ,avr-binutils) + ("gcc" ,avr-gcc) + ("libc" ,avr-libc))) + (synopsis "Complete GCC tool chain for AVR microcontroller development") + (description "This package provides a complete GCC tool chain for AVR microcontroller development. This includes the GCC AVR cross compiler and avrdude for firmware flashing. The supported programming languages are C and C++.") - (home-page (package-home-page avr-libc)) - (license (package-license avr-gcc))))) - -(define-public avr-toolchain-7 (avr-toolchain avr-gcc-7)) + (home-page (package-home-page avr-libc)) + (license (package-license avr-gcc)))) (define-public microscheme (package -- 2.25.1