summaryrefslogtreecommitdiff
path: root/pkgs/by-name/un/unicode-idna/package.nix
blob: 07fe5ca5e94579bdae3d749db03327d6a4525fc8 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  lib,
  stdenvNoCC,
  fetchurl,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "unicode-idna";
  version = "16.0.0";

  src = fetchurl {
    url = "https://www.unicode.org/Public/idna/${finalAttrs.version}/IdnaMappingTable.txt";
    hash = "sha256-bbLvTtNfOz3nTrwuAEBKlgf3bUmfV2uNQEPPFPHtF1w=";
  };

  dontUnpack = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/unicode/idna
    cp -r $src $out/share/unicode/idna/IdnaMappingTable.txt

    runHook postInstall
  '';

  meta = {
    description = "unicode IDNA compatible processing data";
    homepage = "http://www.unicode.org/reports/tr46/";
    license = lib.licenses.unicode-dfs-2016;
    maintainers = with lib.maintainers; [ jopejoe1 ];
    platforms = lib.platforms.all;
  };
})