From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: [PATCH 03/11] gnu: Add function libiconv-if-needed. Date: Mon, 09 May 2016 09:16:42 +0200 Message-ID: <87k2j33dlx.fsf@igalia.com> References: <1462740169-15029-1-git-send-email-janneke@gnu.org> <1462740169-15029-4-git-send-email-janneke@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azfQw-0002Zs-29 for guix-devel@gnu.org; Mon, 09 May 2016 03:16:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azfQr-0003SD-PC for guix-devel@gnu.org; Mon, 09 May 2016 03:16:48 -0400 In-Reply-To: <1462740169-15029-4-git-send-email-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 8 May 2016 22:42:41 +0200") 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: Jan Nieuwenhuizen Cc: guix-devel@gnu.org On Sun 08 May 2016 22:42, Jan Nieuwenhuizen writes: > * 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)) > + '())) > + Needs a docstring, please. Thanks :) > (define-public (canonical-package package) > ;; Avoid circular dependency by lazily resolving 'commencement'. > (let* ((iface (resolve-interface '(gnu packages commencement)))