1 { fetchurl, lib, stdenv, libiconv, libunistring, help2man, texinfo, buildPackages }:
3 # Note: this package is used for bootstrapping fetchurl, and thus
4 # cannot use fetchpatch! All mutable patches (generated by GitHub or
5 # cgit) that are needed here should be included directly in Nixpkgs as
10 stdenv.mkDerivation rec {
15 url = "mirror://gnu/gnu/libidn/${pname}-${version}.tar.gz";
16 sha256 = "sha256-dpQM1Od46Ak1eanRlbJf/16Tbp3GJCBoUotDenZ2T5E=";
20 # Beware: non-bootstrap libidn2 is overridden by ./hack.nix
21 outputs = [ "bin" "dev" "out" "info" "devdoc" ];
23 patches = optional stdenv.isDarwin ./fix-error-darwin.patch;
25 enableParallelBuilding = true;
27 # The above patch causes the documentation to be regenerated, so the
28 # documentation tools are required.
29 nativeBuildInputs = optionals stdenv.isDarwin [ help2man texinfo ];
30 buildInputs = [ libunistring ] ++ optional stdenv.isDarwin libiconv;
31 depsBuildBuild = [ buildPackages.stdenv.cc ];
34 homepage = "https://www.gnu.org/software/libidn/#libidn2";
35 description = "Free software implementation of IDNA2008 and TR46";
38 Libidn2 is believed to be a complete IDNA2008 and TR46 implementation,
39 but has yet to be as extensively used as the IDNA2003 Libidn library.
41 The installed C library libidn2 is dual-licensed under LGPLv3+|GPLv2+,
42 while the rest of the package is GPLv3+. See the file COPYING for
46 license = with lib.licenses; [ lgpl3Plus gpl2Plus gpl3Plus ];
47 platforms = lib.platforms.all;
48 maintainers = with lib.maintainers; [ fpletz ];