2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, readline, gmp, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "6.3.3";
|
|
|
|
pname = "yap";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.dcc.fc.up.pt/~vsc/Yap/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "0y7sjwimadqsvgx9daz28c9mxcx9n1znxklih9xg16k6n54v9qxf";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ readline gmp zlib ];
|
|
|
|
|
|
|
|
configureFlags = [ "--enable-tabling=yes" ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# -fcommon: workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: libYap.a(pl-dtoa.o):/build/yap-6.3.3/H/pl-yap.h:230: multiple definition of `ATOM_';
|
|
|
|
# libYap.a(pl-buffer.o):/build/yap-6.3.3/H/pl-yap.h:230: first defined here
|
|
|
|
NIX_CFLAGS_COMPILE = "-fpermissive -fcommon";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2022-06-16 17:23:12 +00:00
|
|
|
# the linux 32 bit build fails.
|
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || !stdenv.is64bit;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/";
|
|
|
|
description = "A ISO-compatible high-performance Prolog compiler";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.artistic2;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|