2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, which, bison, flex, libmaa, zlib, libtool }:
|
2010-04-14 10:55:50 +00:00
|
|
|
|
2014-01-31 12:17:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "dictd";
|
2021-12-11 11:01:35 +00:00
|
|
|
version = "1.13.1";
|
2010-04-14 10:55:50 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-01-31 12:17:37 +00:00
|
|
|
url = "mirror://sourceforge/dict/dictd-${version}.tar.gz";
|
2021-12-11 11:01:35 +00:00
|
|
|
sha256 = "sha256-5PGmfRaJTYSUVp19yUQsFcw4wBHyuWMcfxzGInZlKhs=";
|
2010-04-14 10:55:50 +00:00
|
|
|
};
|
|
|
|
|
2017-09-07 09:17:39 +00:00
|
|
|
buildInputs = [ libmaa zlib ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ bison flex libtool which ];
|
|
|
|
|
2020-07-28 16:12:20 +00:00
|
|
|
# In earlier versions, parallel building was not supported but it's OK with 1.13
|
|
|
|
enableParallelBuilding = true;
|
2014-01-31 12:17:37 +00:00
|
|
|
|
|
|
|
patchPhase = "patch -p0 < ${./buildfix.diff}";
|
2020-07-28 16:12:20 +00:00
|
|
|
|
2017-09-07 09:17:39 +00:00
|
|
|
configureFlags = [
|
2019-02-14 18:56:35 +00:00
|
|
|
"--datadir=/run/current-system/sw/share/dictd"
|
2020-07-28 16:12:20 +00:00
|
|
|
"--sysconfdir=/etc"
|
2017-09-07 09:17:39 +00:00
|
|
|
];
|
2010-04-14 10:55:50 +00:00
|
|
|
|
2024-05-30 09:43:16 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
|
|
|
|
"-Wno-error=implicit-function-declaration"
|
|
|
|
]);
|
|
|
|
|
2020-07-28 16:12:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} NEWS README
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2010-04-14 10:55:50 +00:00
|
|
|
description = "Dict protocol server and client";
|
2020-07-28 16:12:20 +00:00
|
|
|
homepage = "http://www.dict.org";
|
2023-09-10 19:28:35 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
platforms = platforms.unix;
|
2010-04-14 10:55:50 +00:00
|
|
|
};
|
|
|
|
}
|