about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Darwin <bcdarwin@gmail.com>2023-06-29 12:20:38 -0400
committerVincent Laporte <vbgl@users.noreply.github.com>2023-06-30 06:44:22 +0200
commit3c614fbc76fc152f3e1bc4b2263da6d90adf80fb (patch)
tree0548c94755ada4b29972dea9970da4cb58740ea7
parentb763c20eda8f768909ddafd85a6b7976439f4e3b (diff)
teyjus: unstable-2019-07-26 -> 2.1.1
-rw-r--r--pkgs/development/compilers/teyjus/default.nix30
-rw-r--r--pkgs/development/compilers/teyjus/fix-lex-to-flex.patch25
-rw-r--r--pkgs/top-level/all-packages.nix4
3 files changed, 11 insertions, 48 deletions
diff --git a/pkgs/development/compilers/teyjus/default.nix b/pkgs/development/compilers/teyjus/default.nix
index e8d2ffe172654..3a44a136b6e25 100644
--- a/pkgs/development/compilers/teyjus/default.nix
+++ b/pkgs/development/compilers/teyjus/default.nix
@@ -1,42 +1,28 @@
-{ 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;
diff --git a/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch b/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch
deleted file mode 100644
index fa82d80633ad7..0000000000000
--- a/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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

diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f996c0c00e13e..4096730ed02c7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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;