jadb/nix/kanjidic2.nix

39 lines
678 B
Nix
Raw Permalink Normal View History

{
stdenvNoCC,
kanjidic2-src,
xmlformat,
gzip,
edrdgMetadata,
}:
stdenvNoCC.mkDerivation {
name = "kanjidic2";
src = kanjidic2-src;
dontUnpack = true;
nativeBuildInputs = [
gzip
xmlformat
];
buildPhase = ''
runHook preBuild
gzip -dkc ${kanjidic2-src} > kanjidic2.xml
# xmlformat -i kanjidic2.xml
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dt $out kanjidic2.xml
runHook postInstall
'';
meta = edrdgMetadata // {
# description = "A Japanese-Multilingual Dictionary providing lexical data for japanese words";
# homepage = "https://www.edrdg.org/jmdict/j_jmdict.html";
};
}