2021-03-14 17:50:12 +00:00
|
|
|
{lib, stdenv, fetchurl, bison, flex, readline, ncurses, gnused}:
|
2009-01-24 21:01:27 +00:00
|
|
|
|
2021-06-20 10:34:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cdecl";
|
|
|
|
version = "2.5";
|
2009-01-24 21:01:27 +00:00
|
|
|
src = fetchurl {
|
2021-06-20 10:34:30 +00:00
|
|
|
url = "https://www.cdecl.org/files/${pname}-blocks-${version}.tar.gz";
|
2016-10-26 14:59:37 +00:00
|
|
|
sha256 = "1b7k0ra30hh8mg8fqv0f0yzkaac6lfg6n376drgbpxg4wwml1rly";
|
2009-01-24 21:01:27 +00:00
|
|
|
};
|
|
|
|
|
2014-05-17 20:21:17 +00:00
|
|
|
patches = [ ./cdecl-2.5-lex.patch ];
|
|
|
|
preBuild = ''
|
|
|
|
${gnused}/bin/sed 's/getline/cdecl_getline/g' -i cdecl.c;
|
|
|
|
makeFlagsArray=(CFLAGS="-DBSD -DUSE_READLINE -std=gnu89" LIBS=-lreadline);
|
2014-12-17 18:11:30 +00:00
|
|
|
makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANDIR=$out/man1 CATDIR=$out/cat1 CC=$CC";
|
2014-05-17 20:21:17 +00:00
|
|
|
mkdir -p $out/bin;
|
|
|
|
'';
|
2021-03-14 17:50:12 +00:00
|
|
|
buildInputs = [bison flex readline ncurses];
|
2009-01-24 21:01:27 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Translator English -- C/C++ declarations";
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.publicDomain;
|
|
|
|
maintainers = with lib.maintainers; [joelteon];
|
|
|
|
platforms = lib.platforms.unix;
|
2009-01-24 21:01:27 +00:00
|
|
|
};
|
|
|
|
}
|