nixpkgs/pkgs/development/tools/cdecl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
871 B
Nix
Raw Normal View History

{lib, stdenv, fetchurl, bison, flex, readline, ncurses, gnused}:
stdenv.mkDerivation rec {
pname = "cdecl";
version = "2.5";
src = fetchurl {
url = "https://www.cdecl.org/files/${pname}-blocks-${version}.tar.gz";
2016-10-26 14:59:37 +00:00
sha256 = "1b7k0ra30hh8mg8fqv0f0yzkaac6lfg6n376drgbpxg4wwml1rly";
};
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);
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;
'';
buildInputs = [bison flex readline ncurses];
meta = {
description = "Translator English -- C/C++ declarations";
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.unix;
};
}