39 lines
643 B
Nix
39 lines
643 B
Nix
|
{
|
||
|
stdenv,
|
||
|
radkfile-src,
|
||
|
gzip,
|
||
|
iconv,
|
||
|
edrdgMetadata,
|
||
|
}:
|
||
|
stdenv.mkDerivation {
|
||
|
name = "radkfile";
|
||
|
|
||
|
src = radkfile-src;
|
||
|
dontUnpack = true;
|
||
|
|
||
|
nativeBuildInputs = [
|
||
|
gzip
|
||
|
iconv
|
||
|
];
|
||
|
buildPhase = ''
|
||
|
runHook preBuild
|
||
|
|
||
|
gzip -dkc $src > radkfile
|
||
|
iconv -f EUC-JP -t UTF-8 -o radkfile_utf8 radkfile
|
||
|
|
||
|
runHook postBuild
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
runHook preInstall
|
||
|
|
||
|
install -Dt $out radkfile_utf8
|
||
|
|
||
|
runHook postInstall
|
||
|
'';
|
||
|
|
||
|
meta = edrdgMetadata // {
|
||
|
description = "A file providing searchable decompositions of kanji characters";
|
||
|
homepage = "https://www.edrdg.org/krad/kradinf.html";
|
||
|
};
|
||
|
}
|