about summary refs log tree commit diff
path: root/pkgs/development/libraries/libunistring/default.nix
blob: e865873c2851bb6d7f68454967aeb1eac5177c05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{ fetchurl, lib, stdenv, libiconv, updateAutotoolsGnuConfigScriptsHook }:

# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.

stdenv.mkDerivation rec {
  pname = "libunistring";
  version = "1.1";

  src = fetchurl {
    url = "mirror://gnu/libunistring/${pname}-${version}.tar.gz";
    sha256 = "sha256-oiUr7uyDCsREufaNazitiD2xmRnbNbUiIs+CfDhb22o=";
  };

  outputs = [ "out" "dev" "info" "doc" ];

  strictDeps = true;
  propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
  nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];

  configureFlags = [
    "--with-libiconv-prefix=${libiconv}"
  ];

  doCheck = false;

  /* This seems to cause several random failures like these, which I assume
     is because of bad or missing target dependencies in their build system:

        ./unistdio/test-u16-vasnprintf2.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
        FAIL unistdio/test-u16-vasnprintf2.sh (exit status: 1)

        FAIL: unistdio/test-u16-vasnprintf3.sh
        ======================================

        ./unistdio/test-u16-vasnprintf3.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
        FAIL unistdio/test-u16-vasnprintf3.sh (exit status: 1)
  */
  enableParallelChecking = false;
  enableParallelBuilding = true;

  meta = {
    homepage = "https://www.gnu.org/software/libunistring/";

    description = "Unicode string library";

    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.
    '';

    license = lib.licenses.lgpl3Plus;

    maintainers = [ ];
    platforms = lib.platforms.all;
  };
}