Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, fetchurl 3, unzip 4}: 5 6stdenv.mkDerivation rec { 7 pname = "unihan-database"; 8 version = "15.0.0"; 9 10 src = fetchurl { 11 url = "https://www.unicode.org/Public/zipped/${version}/Unihan.zip"; 12 hash = "sha256-JLFUaR/JfLRCZ7kl1iBkKXCGs/iWtXqBgce21CcCoCY="; 13 }; 14 15 nativeBuildInputs = [ 16 unzip 17 ]; 18 19 setSourceRoot = '' 20 sourceRoot=$PWD 21 ''; 22 23 installPhase = '' 24 runHook preInstall 25 26 mkdir -p $out/share/unicode 27 cp -r * $out/share/unicode 28 29 runHook postInstall 30 ''; 31 32 meta = with lib; { 33 description = "Unicode Han Database"; 34 homepage = "https://www.unicode.org/"; 35 license = licenses.unicode-dfs-2016; 36 platforms = platforms.all; 37 }; 38}