39 lines
678 B
Nix
39 lines
678 B
Nix
{
|
|
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";
|
|
};
|
|
} |