2022-10-30 15:09:59 +00:00
|
|
|
{ lib, stdenv, fetchurl, tcl, tk, Cocoa, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "3.0";
|
|
|
|
pname = "wordnet";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://wordnetcode.princeton.edu/${version}/WordNet-${version}.tar.bz2";
|
|
|
|
sha256 = "08pgjvd2vvmqk3h641x63nxp7wqimb9r30889mkyfh2agc62sjbc";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = [ tcl tk ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed "13i#define USE_INTERP_RESULT 1" -i src/stubs.c
|
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
# Fails the build on clang-16 and on upcoming gcc-14.
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Needs the path to `tclConfig.sh' and `tkConfig.sh'.
|
|
|
|
configureFlags = [
|
|
|
|
"--with-tcl=${tcl}/lib"
|
|
|
|
"--with-tk=${tk}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/wnb --prefix PATH : "$out/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Lexical database for the English language";
|
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = "https://wordnet.princeton.edu/";
|
|
|
|
license = {
|
|
|
|
fullName = "WordNet 3.0 license";
|
|
|
|
url = "https://wordnet.princeton.edu/license-and-commercial-use";
|
|
|
|
};
|
|
|
|
maintainers = [ ];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2022-10-21 18:38:19 +00:00
|
|
|
mainProgram = "wn";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|