2009-09-20 00:17:11 +02:00
|
|
|
{ fetchurl, stdenv, libiconv }:
|
2009-06-27 23:44:47 +02:00
|
|
|
|
2010-02-16 10:08:40 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2010-05-10 01:14:50 +02:00
|
|
|
name = "libunistring-0.9.3";
|
2009-06-27 23:44:47 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/libunistring/${name}.tar.gz";
|
2010-05-10 01:14:50 +02:00
|
|
|
sha256 = "18q620269xzpw39dwvr9zpilnl2dkw5z5kz3mxaadnpv4k3kw3b1";
|
2009-06-27 23:44:47 +02:00
|
|
|
};
|
|
|
|
|
2014-08-17 22:17:13 +02:00
|
|
|
patches = stdenv.lib.optional stdenv.isDarwin [ ./clang.patch ];
|
|
|
|
|
2009-09-20 15:54:22 +02:00
|
|
|
propagatedBuildInputs =
|
2011-07-01 17:51:55 +02:00
|
|
|
stdenv.lib.optional ((! (stdenv ? glibc))
|
|
|
|
|| (stdenv ? cross &&
|
|
|
|
stdenv.cross.config == "i686-pc-mingw32"))
|
|
|
|
libiconv;
|
2009-09-20 00:17:11 +02:00
|
|
|
|
2010-02-15 10:36:33 +01:00
|
|
|
# XXX: There are test failures on non-GNU systems, see
|
|
|
|
# http://lists.gnu.org/archive/html/bug-libunistring/2010-02/msg00004.html .
|
|
|
|
doCheck = (stdenv ? glibc);
|
2009-06-27 23:44:47 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.gnu.org/software/libunistring/;
|
|
|
|
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Unicode string library";
|
2009-06-27 23:44:47 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
This library provides functions for manipulating Unicode strings
|
|
|
|
and for manipulating C strings according to the Unicode
|
|
|
|
standard.
|
|
|
|
|
|
|
|
GNU libunistring is for you if your application involves
|
|
|
|
non-trivial text processing, such as upper/lower case
|
|
|
|
conversions, line breaking, operations on words, or more
|
|
|
|
advanced analysis of text. Text provided by the user can, in
|
|
|
|
general, contain characters of all kinds of scripts. The text
|
|
|
|
processing functions provided by this library handle all scripts
|
|
|
|
and all languages.
|
|
|
|
|
|
|
|
libunistring is for you if your application already uses the ISO
|
|
|
|
C / POSIX <ctype.h>, <wctype.h> functions and the text it
|
|
|
|
operates on is provided by the user and can be in any language.
|
|
|
|
|
|
|
|
libunistring is also for you if your application uses Unicode
|
|
|
|
strings as internal in-memory representation.
|
|
|
|
'';
|
|
|
|
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.lgpl3Plus;
|
2009-07-03 00:54:19 +02:00
|
|
|
|
2015-01-13 22:33:24 +01:00
|
|
|
maintainers = [ ];
|
2010-02-12 14:40:53 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2009-06-27 23:44:47 +02:00
|
|
|
};
|
|
|
|
}
|
2010-02-16 10:08:40 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
# On Cygwin Libtool is unable to find `libiconv.dll' if there's no explicit
|
|
|
|
# `-L/path/to/libiconv' argument on the linker's command line; and since it
|
|
|
|
# can't find the dll, it will only create a static library.
|
|
|
|
(if (stdenv ? glibc)
|
|
|
|
then {}
|
2011-07-01 15:20:12 +02:00
|
|
|
else { configureFlags = "--with-libiconv-prefix=${libiconv}"; })
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
# Don't run the native `strip' when cross-compiling.
|
|
|
|
(if (stdenv ? cross)
|
|
|
|
then { dontStrip = true; }
|
|
|
|
else { }))
|