nixpkgs/pkgs/servers/dict/dictd-wordnet.nix
Eelco Dolstra 40f7b0f9df Another attempt to eradicate ensureDir
See c556a6ea46e71e1907d78b71fab36df30297b3ad.
2014-06-30 14:56:10 +02:00

37 lines
927 B
Nix

{stdenv, fetchsvn, python, wordnet, writeScript}:
stdenv.mkDerivation rec {
version = "542";
name = "dict-db-wordnet-${version}";
buildInputs = [python wordnet];
convert = ./wordnet_structures.py;
builder = writeScript "builder.sh" ''
. ${stdenv}/setup
mkdir -p $out/share/dictd/
cd $out/share/dictd
for i in ${wordnet}/dict/data.*; do
DATA="$DATA `echo $i | sed -e s,data,index,` $i";
done
python ${convert} $DATA
echo en_US.UTF-8 > locale
'';
meta = {
description = "dictd-compatible version of WordNet";
longDescription =
'' WordNet® is a large lexical database of English. This package makes
the wordnet data available to dictd and by extension for lookup with
the dict command. '';
homepage = http://wordnet.princeton.edu/;
maintainers = [ stdenv.lib.maintainers.mornfall ];
platforms = stdenv.lib.platforms.all;
};
}