diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 89ab1f5c3cfe..dc97f7e456a9 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -27,6 +27,7 @@ aycanirican = "Aycan iRiCAN "; balajisivaraman = "Balaji Sivaraman"; bbenoist = "Baptist BENOIST "; + bcdarwin = "Ben Darwin "; bdimcheff = "Brandon Dimcheff "; bennofs = "Benno Fünfstück "; benley = "Benjamin Staffin "; diff --git a/pkgs/development/compilers/teyjus/default.nix b/pkgs/development/compilers/teyjus/default.nix new file mode 100644 index 000000000000..b16b32a6a062 --- /dev/null +++ b/pkgs/development/compilers/teyjus/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, omake, ocaml, flex, bison }: + +stdenv.mkDerivation { + name = "teyjus-2.0b2"; + + src = fetchurl { + url = "https://teyjus.googlecode.com/files/teyjus-source-2.0-b2.tar.gz"; + sha256 = "f589fb460d7095a6e674b7a6413772c41b98654c38602c3e8c477a976da99052"; + }; + + patches = [ ./fix-lex-to-flex.patch ]; + + buildInputs = [ omake ocaml flex bison ]; + + buildPhase = "omake all"; + + checkPhase = "omake check"; + + installPhase = "mkdir -p $out/bin && cp tj* $out/bin"; + + meta = with stdenv.lib; { + description = "An efficient implementation of the Lambda Prolog language"; + homepage = https://code.google.com/p/teyjus/; + license = stdenv.lib.licenses.gpl3; + maintainers = [ maintainers.bcdarwin ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch b/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch new file mode 100644 index 000000000000..d2da1d3facca --- /dev/null +++ b/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch @@ -0,0 +1,23 @@ +diff --git a/source/OMakefile b/source/OMakefile +index 6b19d84..095b8b6 100644 +--- a/source/OMakefile ++++ b/source/OMakefile +@@ -164,12 +164,17 @@ LNK_MAIN = $(FNT)/linkerfront + DEP_MAIN = $(FNT)/dependfront + + ############################################################ ++# Nixpkgs specific changes ++# ++ ++LEX = flex ++ ++############################################################ + # Platform specific changes + # + + if $(mem $(OSTYPE), Cygwin Win32) + YACC = bison -by +- LEX = flex + CFLAGS += -mno-cygwin + INC_C[] += $(INC)/byteswap $(INC)/search + export diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85625d53860c..4b5927007f83 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4173,6 +4173,10 @@ let tbb = callPackage ../development/libraries/tbb { }; + teyjus = callPackage ../development/compilers/teyjus { + omake = omake_rc1; + }; + tinycc = callPackage ../development/compilers/tinycc { }; urweb = callPackage ../development/compilers/urweb { };