1 { fetchurl, lib, stdenv, libiconv, libunistring, help2man, 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 = "1ddqr80kmz4l8g3r3gf7bmf2v29fgivlc2bgxfiscjg2sarivjz1";
19 outputs = [ "bin" "dev" "out" "info" "devdoc" ];
21 patches = optional stdenv.isDarwin ./fix-error-darwin.patch;
23 nativeBuildInputs = optional stdenv.isDarwin help2man;
24 buildInputs = [ libunistring ] ++ optional stdenv.isDarwin libiconv;
25 depsBuildBuild = [ buildPackages.stdenv.cc ];
28 homepage = "https://www.gnu.org/software/libidn/#libidn2";
29 description = "Free software implementation of IDNA2008 and TR46";
32 Libidn2 is believed to be a complete IDNA2008 and TR46 implementation,
33 but has yet to be as extensively used as the IDNA2003 Libidn library.
35 The installed C library libidn2 is dual-licensed under LGPLv3+|GPLv2+,
36 while the rest of the package is GPLv3+. See the file COPYING for
40 repositories.git = "https://gitlab.com/jas/libidn2";
41 license = with lib.licenses; [ lgpl3Plus gpl2Plus gpl3Plus ];
42 platforms = lib.platforms.all;
43 maintainers = with lib.maintainers; [ fpletz ];