lol
1{stdenv, fetchurl, tcl, tk, xlibsWrapper, makeWrapper}:
2
3stdenv.mkDerivation rec {
4 version = "3.0";
5 name = "wordnet-${version}";
6 src = fetchurl {
7 url = "http://wordnetcode.princeton.edu/${version}/WordNet-${version}.tar.bz2";
8 sha256 = "08pgjvd2vvmqk3h641x63nxp7wqimb9r30889mkyfh2agc62sjbc";
9 };
10
11 buildInputs = [tcl tk xlibsWrapper makeWrapper];
12
13 hardeningDisable = [ "format" ];
14
15 patchPhase = ''
16 sed "13i#define USE_INTERP_RESULT 1" -i src/stubs.c
17 '';
18
19 # Needs the path to `tclConfig.sh' and `tkConfig.sh'.
20 configureFlags = "--with-tcl=" + tcl + "/lib " +
21 "--with-tk=" + tk + "/lib";
22
23 postInstall = ''
24 wrapProgram $out/bin/wishwn --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
25 wrapProgram $out/bin/wnb --prefix PATH : "$out/bin"
26 '';
27
28 meta = {
29 description = "Lexical database for the English language";
30
31 longDescription =
32 '' WordNet® is a large lexical database of English. Nouns, verbs,
33 adjectives and adverbs are grouped into sets of cognitive synonyms
34 (synsets), each expressing a distinct concept. Synsets are
35 interlinked by means of conceptual-semantic and lexical relations.
36 The resulting network of meaningfully related words and concepts can
37 be navigated with the browser. WordNet is also freely and publicly
38 available for download. WordNet's structure makes it a useful tool
39 for computational linguistics and natural language processing.
40 '';
41
42 homepage = http://wordnet.princeton.edu/;
43
44 maintainers = [ ];
45 platforms = with stdenv.lib.platforms; linux ++ darwin;
46 };
47}