2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, readline, gettext, ncurses }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnu-apl";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/apl/apl-${version}.tar.gz";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-KRhn8bGTdpOrtXvn2aN2GLA3bj4nCVdIVKe75Suyjrg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ readline gettext ncurses ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ((lib.optionals stdenv.cc.isGNU [
|
2022-04-27 09:35:20 +00:00
|
|
|
# Needed with GCC 8
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Wno-error=int-in-bool-context"
|
|
|
|
"-Wno-error=class-memaccess"
|
|
|
|
"-Wno-error=restrict"
|
|
|
|
"-Wno-error=format-truncation"
|
2021-05-20 23:08:51 +00:00
|
|
|
# Needed with GCC 10
|
|
|
|
"-Wno-error=maybe-uninitialized"
|
2022-04-27 09:35:20 +00:00
|
|
|
# Needed with GCC 11
|
|
|
|
"-Wno-error=misleading-indentation"
|
2023-02-16 17:41:37 +00:00
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-error=nonnull"
|
|
|
|
"-Wno-error=stringop-overflow"
|
|
|
|
"-Wno-error=use-after-free"
|
2024-09-19 14:19:46 +00:00
|
|
|
]) ++ lib.optional stdenv.cc.isClang "-Wno-error=null-dereference");
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
patchPhase = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r support-files/ $out/share/doc/
|
|
|
|
find $out/share/doc/support-files -name 'Makefile*' -delete
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Free interpreter for the APL programming language";
|
|
|
|
homepage = "https://www.gnu.org/software/apl/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.kovirobi ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2021-06-28 23:13:55 +00:00
|
|
|
mainProgram = "apl";
|
2020-04-24 23:36:52 +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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|