Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenvNoCC 3, fetchurl 4, symlinkJoin 5}: 6 7let 8 version = "15.0"; 9 10 fetchData = { suffix, hash }: stdenvNoCC.mkDerivation { 11 pname = "unicode-emoji-${suffix}"; 12 inherit version; 13 14 src = fetchurl { 15 url = "https://www.unicode.org/Public/emoji/${version}/emoji-${suffix}.txt"; 16 inherit hash; 17 }; 18 19 dontUnpack = true; 20 21 installPhase = '' 22 runHook preInstall 23 24 installDir="$out/share/unicode/emoji" 25 mkdir -p "$installDir" 26 cp "$src" "$installDir/emoji-${suffix}.txt" 27 28 runHook postInstall 29 ''; 30 }; 31 32 srcs = { 33 emoji-sequences = fetchData { 34 suffix = "sequences"; 35 hash = "sha256-XCIi2KQy2JagMaaML1SwT79HsPzi5phT8euKPpRetW0="; 36 }; 37 emoji-test = fetchData { 38 suffix = "test"; 39 hash = "sha256-hEXyOsg4jglr4Z0CYuFPzv+Fb/Ugk/I1bciUhfGoU9s="; 40 }; 41 emoji-zwj-sequences = fetchData { 42 suffix = "zwj-sequences"; 43 hash = "sha256-/jV/kRe3dGZ2Bjdl1YcTft+bJZA6eSvVSTW/CFZ5EYI="; 44 }; 45 }; 46in 47 48symlinkJoin rec { 49 name = "unicode-emoji-${version}"; 50 51 paths = lib.attrValues srcs; 52 53 passthru = srcs; 54 55 meta = with lib; { 56 description = "Unicode Emoji Data Files"; 57 homepage = "https://home.unicode.org/emoji/"; 58 license = licenses.unicode-dfs-2016; 59 platforms = platforms.all; 60 }; 61}