Commit c56ed872 authored by qzylinra's avatar qzylinra
Browse files

yap: 6.3.3 -> 7.6.0-unstable-2025-05-23

parent 5a1cf292
Loading
Loading
Loading
Loading
+28 −10
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchFromGitHub,
  cmake,
  pkg-config,
  R,
  readline,
  gmp,
  zlib,
  librdf_raptor2,
}:

stdenv.mkDerivation rec {
  version = "6.3.3";
stdenv.mkDerivation {
  pname = "yap";
  version = "7.6.0-unstable-2025-05-23";

  src = fetchurl {
    url = "https://www.dcc.fc.up.pt/~vsc/Yap/${pname}-${version}.tar.gz";
    sha256 = "0y7sjwimadqsvgx9daz28c9mxcx9n1znxklih9xg16k6n54v9qxf";
  src = fetchFromGitHub {
    owner = "vscosta";
    repo = "yap";
    rev = "010bb5e48d2f4fbdc0c47ae9faa830a179b3c31b";
    hash = "sha256-ojhporq7vCEtdwCIRHwzjpc6dbFFXAgF+p6M7eL3JIE=";
  };

  nativeBuildInputs = [
    cmake
    pkg-config
    R
  ];

  buildInputs = [
    readline
    gmp
    zlib
    librdf_raptor2
  ];

  configureFlags = [ "--enable-tabling=yes" ];
  cmakeFlags = [
    (lib.cmakeBool "WITH_READLINE" true)
    (lib.cmakeBool "WITH_R" true)
    (lib.cmakeBool "WITH_Raptor2" true)
    (lib.cmakeBool "WITH_CUDD" false)
    (lib.cmakeBool "WITH_Gecode" false)
  ];

  # -fcommon: workaround build failure on -fno-common toolchains like upstream
  # gcc-10. Otherwise build fails as:
@@ -31,13 +50,12 @@ stdenv.mkDerivation rec {
  env.NIX_CFLAGS_COMPILE = "-fpermissive -fcommon";

  meta = {
    # the linux 32 bit build fails.
    # linux 32 bit build fails.
    broken =
      (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) || !stdenv.hostPlatform.is64bit;
    homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/";
    homepage = "https://github.com/vscosta/yap";
    description = "ISO-compatible high-performance Prolog compiler";
    license = lib.licenses.artistic2;

    platforms = lib.platforms.linux;
  };
}