2021-01-23 13:15:07 +00:00
|
|
|
{ lib, stdenv, fetchurl, readline, gettext, ncurses }:
|
2015-03-16 21:57:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gnu-apl";
|
2024-07-01 00:29:29 +00:00
|
|
|
version = "1.9";
|
2015-03-16 21:57:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/apl/apl-${version}.tar.gz";
|
2024-07-01 00:29:29 +00:00
|
|
|
sha256 = "sha256-KRhn8bGTdpOrtXvn2aN2GLA3bj4nCVdIVKe75Suyjrg=";
|
2015-03-16 21:57:51 +00:00
|
|
|
};
|
|
|
|
|
2015-06-12 03:00:13 +00:00
|
|
|
buildInputs = [ readline gettext ncurses ];
|
2015-03-16 21:57:51 +00:00
|
|
|
|
2024-08-16 20:56:37 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ((lib.optionals stdenv.cc.isGNU [
|
2022-04-15 16:53:31 +00:00
|
|
|
# Needed with GCC 8
|
2019-01-17 11:24:58 +00:00
|
|
|
"-Wno-error=int-in-bool-context"
|
|
|
|
"-Wno-error=class-memaccess"
|
|
|
|
"-Wno-error=restrict"
|
|
|
|
"-Wno-error=format-truncation"
|
2021-05-07 18:57:33 +00:00
|
|
|
# Needed with GCC 10
|
|
|
|
"-Wno-error=maybe-uninitialized"
|
2022-04-15 16:53:31 +00:00
|
|
|
# Needed with GCC 11
|
|
|
|
"-Wno-error=misleading-indentation"
|
2022-12-23 16:57:29 +00:00
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-error=nonnull"
|
|
|
|
"-Wno-error=stringop-overflow"
|
|
|
|
"-Wno-error=use-after-free"
|
2024-08-16 20:56:37 +00:00
|
|
|
]) ++ lib.optional stdenv.cc.isClang "-Wno-error=null-dereference");
|
2017-11-16 17:44:12 +00:00
|
|
|
|
2021-01-23 13:15:07 +00:00
|
|
|
patchPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2016-12-18 03:29:17 +00:00
|
|
|
substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"
|
|
|
|
'';
|
|
|
|
|
2015-03-16 21:57:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
cp -r support-files/ $out/share/doc/
|
|
|
|
find $out/share/doc/support-files -name 'Makefile*' -delete
|
|
|
|
'';
|
|
|
|
|
2021-01-23 13:15:07 +00:00
|
|
|
meta = with lib; {
|
2022-05-28 22:56:40 +00:00
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2015-03-30 12:54:22 +00:00
|
|
|
description = "Free interpreter for the APL programming language";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/apl/";
|
2015-03-30 12:54:22 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.kovirobi ];
|
2017-03-20 08:24:35 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2021-06-14 16:34:32 +00:00
|
|
|
mainProgram = "apl";
|
2015-03-16 21:57:51 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
GNU APL is a free interpreter for the programming language APL, with an
|
|
|
|
(almost) complete implementation of ISO standard 13751 aka. Programming
|
|
|
|
Language APL, Extended. GNU APL was written and is being maintained by
|
|
|
|
Jürgen Sauermann.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|