forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / libidn2 / default.nix
blob90c7198757c70482587fc386eecfb917191eb73a
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
6 # files.
8 stdenv.mkDerivation rec {
9   pname = "libidn2";
10   version = "2.3.7";
12   src = fetchurl {
13     url = "https://ftp.gnu.org/gnu/libidn/${pname}-${version}.tar.gz";
14     hash = "sha256-TCGnkbYQuVGbnQ4SuAl78vNZsS+N2SZHYRqSnmv9fWQ=";
15   };
17   strictDeps = true;
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 ];
29   meta = {
30     homepage = "https://www.gnu.org/software/libidn/#libidn2";
31     description = "Free software implementation of IDNA2008 and TR46";
33     longDescription = ''
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
39       detailed information.
40     '';
42     mainProgram = "idn2";
43     license = with lib.licenses; [ lgpl3Plus gpl2Plus gpl3Plus ];
44     platforms = lib.platforms.all;
45     maintainers = with lib.maintainers; [ fpletz ];
46   };