Commit 3c614fbc authored by Ben Darwin's avatar Ben Darwin Committed by Vincent Laporte
Browse files

teyjus: unstable-2019-07-26 -> 2.1.1

parent b763c20e
Loading
Loading
Loading
Loading
+8 −22
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, omake, ocaml, flex, bison }:
{ lib, fetchFromGitHub, buildDunePackage, flex, bison }:

stdenv.mkDerivation rec {
buildDunePackage rec {
  pname = "teyjus";
  version = "unstable-2019-07-26";
  version = "2.1.1";

  src = fetchFromGitHub {
    owner = "teyjus";
    repo = "teyjus";
    rev = "e63f40aa9f1d0ea5e7bac41aae5e479c3616545c";
    sha256 = "sha256-gaAWKd5/DZrIPaaQzx9l0KtCMW9LPw17vvNPsnopZA0=";
    rev = "refs/tags/v${version}";
    hash = "sha256-N4XKDd0NFr501PYUdb7PM2sWh0uD1/SUFXoMr10f064=";
  };

  patches = [
    ./fix-lex-to-flex.patch
  ];

  postPatch = ''
    sed -i "/TST/d" source/OMakefile
    rm -rf source/front/caml
  '';

  strictDeps = true;

  nativeBuildInputs = [ omake ocaml flex bison ];
  nativeBuildInputs = [ flex bison ];

  hardeningDisable = [ "format" ];

  env.NIX_CFLAGS_COMPILE = "-I${ocaml}/include";

  buildPhase = "omake all";

  checkPhase = "omake check";

  installPhase = "mkdir -p $out/bin && cp tj* $out/bin";
  doCheck = true;

  meta = with lib; {
    description = "An efficient implementation of the Lambda Prolog language";
    homepage = "https://github.com/teyjus/teyjus";
    changelog = "https://github.com/teyjus/teyjus/releases/tag/v${version}";
    license = lib.licenses.gpl3;
    maintainers = [ maintainers.bcdarwin ];
    platforms = platforms.unix;
+0 −25
Original line number Diff line number Diff line
diff --git a/source/OMakefile b/source/OMakefile
index e6bd37e..1bbc0a8 100644
--- a/source/OMakefile
+++ b/source/OMakefile
@@ -184,6 +184,12 @@ DEP_MAIN = $(FNT)/dependfront
 PAR_MAIN = $(FNT)/parsefront
 
 ############################################################
+# Nixpkgs specific changes
+#
+
+LEX = flex
+
+############################################################
 # Platform specific changes
 #
 
@@ -194,7 +200,6 @@ if $(mem $(SYSNAME), Linux)
 
 if $(mem $(OSTYPE), Cygwin Win32)
     YACC = bison -by
-    LEX = flex
     CC = i686-pc-mingw32-gcc
     INC_C[] += $(INC)/byteswap $(INC)/search
     export
+3 −1
Original line number Diff line number Diff line
@@ -16960,7 +16960,9 @@ with pkgs;
    inherit (darwin.apple_sdk.frameworks) Cocoa Foundation;
  };
  teyjus = callPackage ../development/compilers/teyjus { };
  teyjus = callPackage ../development/compilers/teyjus {
    inherit (ocamlPackages) buildDunePackage;
  };
  thrust = callPackage ../development/tools/thrust {
    gconf = gnome2.GConf;