iconv: remove usage on Linux in several packages

This fixes builds after #4419. Thanks to @vbgl for the original commit;
I changed that as I'm not sure whether passing null values to buildInputs is clean.

CC maintainers: @coroa, @peti, @phreedom, @robberer, @jcumming.
This commit is contained in:
Vladimír Čunát
2014-11-03 12:55:12 +01:00
parent 5b00625aa4
commit ed867a50eb
7 changed files with 30 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
{stdenv, fetchurl, libiconv, ocaml, findlib, ncurses}:
{stdenv, fetchurl, libiconvOrNull, ocaml, findlib, ncurses}:
stdenv.mkDerivation {
name = "ocaml-text-0.6";
@@ -8,9 +8,12 @@ stdenv.mkDerivation {
sha256 = "0j8gaak0ajnlmn8knvfygqwwzs7awjv5rfn5cbj6qxqbxhjd5m6g";
};
buildInputs = [ocaml findlib libiconv ncurses];
buildInputs = [ocaml findlib ncurses]
++ stdenv.lib.optional (libiconvOrNull != null) libiconvOrNull;
configurePhase = "iconv_prefix=${libiconv} ocaml setup.ml -configure";
configurePhase =
(stdenv.lib.optionalString (libiconvOrNull != null) "iconv_prefix=${libiconvOrNull} ")
+ "ocaml setup.ml -configure";
createFindlibDestdir = true;
@@ -18,9 +21,7 @@ stdenv.mkDerivation {
meta = {
homepage = "http://ocaml-text.forge.ocamlcore.org/";
description = "OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. ";
license = "BSD";
license = stdenv.lib.licenses.bsd3;
platforms = ocaml.meta.platforms;
maintainers = [
];
};
}