Merge pull request #4697 from jirkamarsik/acgtk

Added acgtk-1.1 and dependencies ansiterminal-0.6.5 and bolt-1.4
This commit is contained in:
cillianderoiste 2014-10-28 16:58:59 +01:00
commit 24bb677ece
8 changed files with 172 additions and 0 deletions

View file

@ -87,6 +87,11 @@ rec {
fullName = "Common Development and Distribution License 1.0";
};
cecill20 = spdx {
shortName = "CECILL-2.0";
fullName = "CeCILL Free Software License Agreement v2.0";
};
cecill-b = spdx {
shortName = "CECILL-B";
fullName = "CeCILL-B Free Software License Agreement";

View file

@ -73,6 +73,7 @@
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>";
jcumming = "Jack Cummings <jack@mudshark.org>";
jgeerds = "Jascha Geerds <jg@ekby.de>";
jirkamarsik = "Jirka Marsik <jiri.marsik89@gmail.com>";
joamaki = "Jussi Maki <joamaki@gmail.com>";
joelteon = "Joel Taylor <me@joelt.io>";
jwiegley = "John Wiegley <johnw@newartisans.com>";

View file

@ -0,0 +1,51 @@
{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal,
buildBytecode ? true,
buildNative ? true,
installExamples ? true,
installEmacsMode ? true }:
let inherit (stdenv.lib) getVersion versionAtLeast
optionals optionalString; in
assert versionAtLeast (getVersion ocaml) "3.07";
assert versionAtLeast (getVersion dypgen) "20080925";
assert versionAtLeast (getVersion bolt) "1.4";
assert buildBytecode || buildNative;
stdenv.mkDerivation {
name = "acgtk-1.1";
src = fetchurl {
url = "http://www.loria.fr/equipes/calligramme/acg/software/acg-1.1-20140905.tar.gz";
sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6";
};
buildInputs = [ ocaml findlib dypgen bolt ansiterminal ];
patches = [ ./install-emacs-to-site-lisp.patch
./use-nix-ocaml-byteflags.patch ];
# The bytecode executable is dependent on the dynamic library provided by
# ANSITerminal. We can use the -dllpath flag of ocamlc (analogous to
# -rpath) to make sure that ocamlrun is able to link the library at
# runtime and that Nix detects a runtime dependency.
NIX_OCAML_BYTEFLAGS = "-dllpath ${ansiterminal}/lib/ocaml/${getVersion ocaml}/site-lib/ANSITerminal";
buildFlags = optionalString buildBytecode "byte"
+ " "
+ optionalString buildNative "opt";
installTargets = "install"
+ " " + optionalString installExamples "install-examples"
+ " " + optionalString installEmacsMode "install-emacs";
meta = with stdenv.lib; {
homepage = "http://www.loria.fr/equipes/calligramme/acg";
description = "A toolkit for developing ACG signatures and lexicon";
license = licenses.cecill20;
platforms = ocaml.meta.platforms;
maintainers = [ maintainers.jirkamarsik ];
};
}

View file

@ -0,0 +1,23 @@
--- acg-1.1-20140905/Makefile.in 2014-10-24 15:21:39.442287208 +0200
+++ acg-1.1-20140905/Makefile.in.new 2014-10-24 15:24:58.557117228 +0200
@@ -35,6 +35,7 @@
ACGC_DIR=src/acg-data
DATA_DIR=@datarootdir@/acgtk
+EMACS_DIR=@prefix@/share/emacs/site-lisp
@@ -82,10 +83,10 @@
rm -r $(DATA_DIR)
install-emacs:
- mkdir -p $(DATA_DIR) && cp -r emacs $(DATA_DIR)/.
+ mkdir -p $(EMACS_DIR) && cp emacs/acg.el $(EMACS_DIR)
uninstall-emacs:
- rm -rf $(DATA_DIR)/emacs
+ rm -rf $(EMACS_DIR)/emacs
install-examples:
mkdir -p $(DATA_DIR) && cp -r examples $(DATA_DIR)/.

View file

@ -0,0 +1,11 @@
--- acg-1.1-20140905/src/Makefile.master.in 2014-10-27 10:59:42.263382081 +0100
+++ acg-1.1-20140905/src/Makefile.master.in.new 2014-10-27 10:59:59.683597972 +0100
@@ -23,7 +23,7 @@
# All warnings are treated as errors
WARNINGS = @OCAML09WARNINGS@ -warn-error A
COMMONFLAGS= $(WARNINGS) @TYPES@
-BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG)
+BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG) $(NIX_OCAML_BYTEFLAGS)
OPTFLAGS = $(COMMONFLAGS)
LFLAGS= -a

View file

@ -0,0 +1,34 @@
{ stdenv, fetchurl, ocaml, findlib }:
stdenv.mkDerivation {
name = "ansiterminal-0.6.5";
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/1206/ANSITerminal-0.6.5.tar.gz";
sha256 = "1j9kflv2i16vf9hy031cl6z8hv6791mjbhnd9bw07y1pswdlx1r6";
};
buildInputs = [ ocaml findlib ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
buildPhase = "ocaml setup.ml -build";
installPhase = "ocaml setup.ml -install";
createFindlibDestdir = true;
meta = with stdenv.lib; {
homepage = "https://forge.ocamlcore.org/projects/ansiterminal";
description = "A module allowing to use the colors and cursor movements on ANSI terminals";
longDescription = ''
ANSITerminal is a module allowing to use the colors and cursor
movements on ANSI terminals. It also works on the windows shell (but
this part is currently work in progress).
'';
license = licenses.lgpl3;
platforms = ocaml.meta.platforms;
maintainers = [ maintainers.jirkamarsik ];
};
}

View file

@ -0,0 +1,41 @@
{ stdenv, fetchurl, ocaml, findlib, which }:
let inherit (stdenv.lib) getVersion versionAtLeast; in
assert versionAtLeast (getVersion ocaml) "4.00.0";
assert versionAtLeast (getVersion findlib) "1.3.3";
stdenv.mkDerivation rec {
name = "bolt-1.4";
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/1043/${name}.tar.gz";
sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy";
};
buildInputs = [ ocaml findlib which ];
# The custom `configure` script does not expect the --prefix
# option. Installation is handled by ocamlfind.
dontAddPrefix = true;
createFindlibDestdir = true;
buildFlags = "all";
doCheck = true;
checkTarget = "tests";
meta = with stdenv.lib; {
homepage = "http://bolt.x9c.fr";
description = "A logging tool for the OCaml language";
longDescription = ''
Bolt is a logging tool for the OCaml language. It is inspired by and
modeled after the famous log4j logging framework for Java.
'';
license = licenses.lgpl3;
platforms = ocaml.meta.platforms;
maintainers = [ maintainers.jirkamarsik ];
};
}

View file

@ -3482,6 +3482,12 @@ let
in rec {
inherit ocaml;
acgtk = callPackage ../applications/science/logic/acgtk { };
ansiterminal = callPackage ../development/ocaml-modules/ansiterminal { };
bolt = callPackage ../development/ocaml-modules/bolt { };
camlidl = callPackage ../development/tools/ocaml/camlidl { };
camlp4 =