1{ stdenv, fetchurl, readline, gettext, ncurses }:
2
3with stdenv.lib;
4stdenv.mkDerivation rec {
5 name = "gnu-apl-${version}";
6 version = "1.7";
7
8 src = fetchurl {
9 url = "mirror://gnu/apl/apl-${version}.tar.gz";
10 sha256 = "07xq8ddlmz8psvsmwr23gar108ri0lwmw0n6kpxcv8ypas1f5xlg";
11 };
12
13 buildInputs = [ readline gettext ncurses ];
14
15 patchPhase = optionalString stdenv.isDarwin ''
16 substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"
17 '';
18
19 postInstall = ''
20 cp -r support-files/ $out/share/doc/
21 find $out/share/doc/support-files -name 'Makefile*' -delete
22 '';
23
24 meta = {
25 description = "Free interpreter for the APL programming language";
26 homepage = http://www.gnu.org/software/apl/;
27 license = licenses.gpl3Plus;
28 maintainers = [ maintainers.kovirobi ];
29 platforms = with platforms; linux ++ darwin;
30 inherit version;
31
32 longDescription = ''
33 GNU APL is a free interpreter for the programming language APL, with an
34 (almost) complete implementation of ISO standard 13751 aka. Programming
35 Language APL, Extended. GNU APL was written and is being maintained by
36 Jürgen Sauermann.
37 '';
38 };
39}