aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-12-09 18:11:14 +0100
committerLudovic Courtès <ludo@gnu.org>2016-12-09 18:11:14 +0100
commitf80b4d2ce09b0b7770cbdf2f90704d41b0a168c5 (patch)
treeec47c7ee5d5579cfa00f13b5038ff3d8c87e4a48 /gnu/packages/base.scm
parent13b5f44b475aa385d580f7e19b907210bc1d6d99 (diff)
parent2608e40988ba8cf51723fe0d21bdedf6b3997c9c (diff)
downloadguix-f80b4d2ce09b0b7770cbdf2f90704d41b0a168c5.tar
guix-f80b4d2ce09b0b7770cbdf2f90704d41b0a168c5.tar.gz
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 2dd17a9ebb..c2430f656f 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -46,7 +46,8 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (ice-9 match)
- #:export (glibc))
+ #:export (glibc
+ libiconv-if-needed))
;;; Commentary:
;;;
@@ -1032,6 +1033,16 @@ 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)))
+ "Return either a libiconv package specification to include in a dependency
+list for platforms that have an incomplete libc, or the empty list. If a
+package needs iconv ,@(libiconv-if-needed) should be added."
+ ;; POSIX C libraries provide iconv. Platforms with an incomplete libc
+ ;; without iconv, such as MinGW, must return the then clause.
+ (if (target-mingw? target)
+ `(("libiconv" ,libiconv))
+ '()))
+
(define-public (canonical-package package)
;; Avoid circular dependency by lazily resolving 'commencement'.
(let* ((iface (resolve-interface '(gnu packages commencement)))