nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, readline, gettext, ncurses }:
2
3stdenv.mkDerivation rec {
4 pname = "gnu-apl";
5 version = "1.8";
6
7 src = fetchurl {
8 url = "mirror://gnu/apl/apl-${version}.tar.gz";
9 sha256 = "1jxvv2h3y1am1fw6r5sn3say1n0dj8shmscbybl0qhqdia2lqkql";
10 };
11
12 buildInputs = [ readline gettext ncurses ];
13
14 NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [
15 # Needed with GCC 8
16 "-Wno-error=int-in-bool-context"
17 "-Wno-error=class-memaccess"
18 "-Wno-error=restrict"
19 "-Wno-error=format-truncation"
20 # Needed with GCC 10
21 "-Wno-error=maybe-uninitialized"
22 # Needed with GCC 11
23 "-Wno-error=misleading-indentation"
24 ]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference");
25
26 patchPhase = lib.optionalString stdenv.isDarwin ''
27 substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"
28 '';
29
30 postInstall = ''
31 cp -r support-files/ $out/share/doc/
32 find $out/share/doc/support-files -name 'Makefile*' -delete
33 '';
34
35 meta = with lib; {
36 broken = stdenv.isDarwin;
37 description = "Free interpreter for the APL programming language";
38 homepage = "https://www.gnu.org/software/apl/";
39 license = licenses.gpl3Plus;
40 maintainers = [ maintainers.kovirobi ];
41 platforms = with platforms; linux ++ darwin;
42 mainProgram = "apl";
43
44 longDescription = ''
45 GNU APL is a free interpreter for the programming language APL, with an
46 (almost) complete implementation of ISO standard 13751 aka. Programming
47 Language APL, Extended. GNU APL was written and is being maintained by
48 Jürgen Sauermann.
49 '';
50 };
51}