depot/third_party/nixpkgs/pkgs/by-name/un/unihan-database/package.nix

38 lines
671 B
Nix

{
lib,
stdenv,
fetchurl,
unzip,
}:
stdenv.mkDerivation rec {
pname = "unihan-database";
version = "15.1.0";
src = fetchurl {
url = "https://www.unicode.org/Public/zipped/${version}/Unihan.zip";
hash = "sha256-oCJmEOMkvPeErDgOEfTL9TPuHms9AosJkb+MDcP4WFM=";
};
nativeBuildInputs = [
unzip
];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/share/unicode
cp -r * $out/share/unicode
runHook postInstall
'';
meta = with lib; {
description = "Unicode Han Database";
homepage = "https://www.unicode.org/";
license = licenses.unicode-dfs-2016;
platforms = platforms.all;
};
}