[Nix-dev] [PATCH 2/4] Docbook2x needs libiconv to build successfully on Darwin.

Peter Simons simons at cryp.to
Thu Oct 8 14:25:49 CEST 2009


---
 pkgs/tools/typesetting/docbook2x/default.nix |    5 +++--
 pkgs/top-level/all-packages.nix              |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkgs/tools/typesetting/docbook2x/default.nix b/pkgs/tools/typesetting/docbook2x/default.nix
index 72e528a..c02471d 100644
--- a/pkgs/tools/typesetting/docbook2x/default.nix
+++ b/pkgs/tools/typesetting/docbook2x/default.nix
@@ -1,6 +1,6 @@
 { fetchurl, stdenv, texinfo, perl
 , XMLSAX, XMLParser, XMLNamespaceSupport
-, groff, libxml2, libxslt, gnused
+, groff, libxml2, libxslt, gnused, libiconv
 , makeWrapper }:
 
 stdenv.mkDerivation rec {
@@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
   patches = [ ./db2x_texixml-to-stdout.patch ];
 
   buildInputs = [ perl texinfo groff libxml2 libxslt makeWrapper
-                  XMLSAX XMLParser XMLNamespaceSupport ];
+                  XMLSAX XMLParser XMLNamespaceSupport
+  	        ] ++ (if libiconv != null then [libiconv] else []);
 
   postConfigure = ''
     # Broken substitution is used for `perl/config.pl', which leaves literal
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 842ca0b..c994e29 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -664,6 +664,7 @@ let
     inherit fetchurl stdenv texinfo perl
             gnused groff libxml2 libxslt makeWrapper;
     inherit (perlPackages) XMLSAX XMLParser XMLNamespaceSupport;
+    libiconv = if system == "i686-darwin" then libiconv else null;
   };
 
   dosfstools = composedArgsAndFun (import ../tools/misc/dosfstools) {
-- 
1.6.4.4




More information about the nix-dev mailing list