1{ fetchurl, lib, stdenv, libiconv
2, testers
3}:
4
5stdenv.mkDerivation (finalAttrs: {
6 pname = "libidn";
7 version = "1.41";
8
9 src = fetchurl {
10 url = "mirror://gnu/libidn/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
11 sha256 = "sha256-iE1wY2S4Gr3Re+6Whtj/KudDHFoUZRBHxorfizH9iUU=";
12 };
13
14 outputs = [ "bin" "dev" "out" "info" "devdoc" ];
15
16 hardeningDisable = [ "format" ];
17
18 buildInputs = lib.optional stdenv.isDarwin libiconv;
19
20 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
21
22 meta = {
23 homepage = "https://www.gnu.org/software/libidn/";
24 description = "Library for internationalized domain names";
25
26 longDescription = ''
27 GNU Libidn is a fully documented implementation of the
28 Stringprep, Punycode and IDNA specifications. Libidn's purpose
29 is to encode and decode internationalized domain names. The
30 native C, C\# and Java libraries are available under the GNU
31 Lesser General Public License version 2.1 or later.
32
33 The library contains a generic Stringprep implementation.
34 Profiles for Nameprep, iSCSI, SASL, XMPP and Kerberos V5 are
35 included. Punycode and ASCII Compatible Encoding (ACE) via IDNA
36 are supported. A mechanism to define Top-Level Domain (TLD)
37 specific validation tables, and to compare strings against those
38 tables, is included. Default tables for some TLDs are also
39 included.
40 '';
41
42 license = lib.licenses.lgpl2Plus;
43 pkgConfigModules = [ "libidn" ];
44 platforms = lib.platforms.all;
45 maintainers = with lib.maintainers; [ lsix ];
46 };
47})