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
8 stdenv.mkDerivation rec {
13 url = "https://ftp.gnu.org/gnu/libidn/${pname}-${version}.tar.gz";
14 hash = "sha256-TCGnkbYQuVGbnQ4SuAl78vNZsS+N2SZHYRqSnmv9fWQ=";
18 # Beware: non-bootstrap libidn2 is overridden by ./hack.nix
19 outputs = [ "bin" "dev" "out" "info" "devdoc" ];
21 enableParallelBuilding = true;
23 # The above patch causes the documentation to be regenerated, so the
24 # documentation tools are required.
25 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ help2man texinfo ];
26 buildInputs = [ libunistring ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
27 depsBuildBuild = [ buildPackages.stdenv.cc ];
30 homepage = "https://www.gnu.org/software/libidn/#libidn2";
31 description = "Free software implementation of IDNA2008 and TR46";
34 Libidn2 is believed to be a complete IDNA2008 and TR46 implementation,
35 but has yet to be as extensively used as the IDNA2003 Libidn library.
37 The installed C library libidn2 is dual-licensed under LGPLv3+|GPLv2+,
38 while the rest of the package is GPLv3+. See the file COPYING for
43 license = with lib.licenses; [ lgpl3Plus gpl2Plus gpl3Plus ];
44 platforms = lib.platforms.all;
45 maintainers = with lib.maintainers; [ fpletz ];