2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "unihan-database";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "15.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.unicode.org/Public/zipped/${version}/Unihan.zip";
|
2022-09-22 12:36:57 +00:00
|
|
|
hash = "sha256-JLFUaR/JfLRCZ7kl1iBkKXCGs/iWtXqBgce21CcCoCY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
unzip
|
|
|
|
];
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$PWD
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share/unicode
|
|
|
|
cp -r * $out/share/unicode
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unicode Han Database";
|
|
|
|
homepage = "https://www.unicode.org/";
|
|
|
|
license = licenses.unicode-dfs-2016;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|