On Sun 08 May 2016 22:42, Jan Nieuwenhuizen <jann...@gnu.org> 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)))