2022-10-29 16:58:24 +00:00
|
|
|
{ lib, stdenv, fetchurl, tcl, tk, Cocoa, makeWrapper }:
|
2008-02-13 14:26:01 +00:00
|
|
|
|
2017-08-24 18:06:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "3.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "wordnet";
|
2008-02-13 14:26:01 +00:00
|
|
|
src = fetchurl {
|
2010-02-08 13:53:16 +00:00
|
|
|
url = "http://wordnetcode.princeton.edu/${version}/WordNet-${version}.tar.bz2";
|
|
|
|
sha256 = "08pgjvd2vvmqk3h641x63nxp7wqimb9r30889mkyfh2agc62sjbc";
|
2008-02-13 14:26:01 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-10-29 16:58:24 +00:00
|
|
|
buildInputs = [ tcl tk ]
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2008-02-13 14:26:01 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-08 00:28:41 +00:00
|
|
|
|
2015-05-15 22:56:35 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed "13i#define USE_INTERP_RESULT 1" -i src/stubs.c
|
|
|
|
'';
|
|
|
|
|
2008-02-13 14:26:01 +00:00
|
|
|
# Needs the path to `tclConfig.sh' and `tkConfig.sh'.
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-tcl=${tcl}/lib"
|
|
|
|
"--with-tk=${tk}/lib"
|
|
|
|
];
|
2008-02-13 14:26:01 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2010-05-28 10:57:50 +00:00
|
|
|
wrapProgram $out/bin/wishwn --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
|
2008-02-13 14:26:01 +00:00
|
|
|
wrapProgram $out/bin/wnb --prefix PATH : "$out/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "Lexical database for the English language";
|
2010-02-08 13:53:16 +00:00
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' WordNet® is a large lexical database of English. Nouns, verbs,
|
|
|
|
adjectives and adverbs are grouped into sets of cognitive synonyms
|
|
|
|
(synsets), each expressing a distinct concept. Synsets are
|
|
|
|
interlinked by means of conceptual-semantic and lexical relations.
|
|
|
|
The resulting network of meaningfully related words and concepts can
|
|
|
|
be navigated with the browser. WordNet is also freely and publicly
|
|
|
|
available for download. WordNet's structure makes it a useful tool
|
|
|
|
for computational linguistics and natural language processing.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://wordnet.princeton.edu/";
|
2018-09-01 12:24:34 +00:00
|
|
|
license = {
|
|
|
|
fullName = "WordNet 3.0 license";
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "https://wordnet.princeton.edu/license-and-commercial-use";
|
2018-09-01 12:24:34 +00:00
|
|
|
};
|
2013-08-16 21:44:33 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 05:42:41 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2022-10-11 14:26:01 +00:00
|
|
|
mainProgram = "wn";
|
2008-02-13 14:26:01 +00:00
|
|
|
};
|
|
|
|
}
|