From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: [PATCH 03/11] gnu: Add function libiconv-if-needed. Date: Sun, 8 May 2016 22:42:41 +0200 Message-ID: <1462740169-15029-4-git-send-email-janneke@gnu.org> References: <1462740169-15029-1-git-send-email-janneke@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azVXc-0004Gp-HD for guix-devel@gnu.org; Sun, 08 May 2016 16:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azVXW-0008Dh-Vy for guix-devel@gnu.org; Sun, 08 May 2016 16:43:04 -0400 In-Reply-To: <1462740169-15029-1-git-send-email-janneke@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/base.scm (libiconv-if-needed): New function. --- gnu/packages/base.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index beb689e..51d70b1 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -44,7 +44,8 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) - #:use-module (guix build-system trivial)) + #:use-module (guix build-system trivial) + :export (libiconv-if-needed)) ;;; Commentary: ;;; @@ -964,6 +965,11 @@ program. It supports a wide variety of different encodings.") (home-page "http://www.gnu.org/software/libiconv/") (license lgpl3+))) +(define* (libiconv-if-needed #:optional (target (%current-target-system))) + (if (mingw-target? target) + `(("libiconv" ,libiconv)) + '())) + (define-public (canonical-package package) ;; Avoid circular dependency by lazily resolving 'commencement'. (let* ((iface (resolve-interface '(gnu packages commencement))) -- 2.7.3