commit
b3ed2b4c18
|
@ -1,57 +1,27 @@
|
||||||
{ stdenv, fetchurl, ocamlPackages,
|
{ stdenv, fetchurl, dune, ocamlPackages }:
|
||||||
buildBytecode ? true,
|
|
||||||
buildNative ? true,
|
|
||||||
installExamples ? true,
|
|
||||||
installEmacsMode ? true }:
|
|
||||||
|
|
||||||
let inherit (stdenv.lib) versionAtLeast optionalString; in
|
|
||||||
|
|
||||||
let inherit (ocamlPackages) ocaml camlp4; in
|
|
||||||
|
|
||||||
assert buildBytecode || buildNative;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
|
||||||
name = "acgtk-1.3.1";
|
name = "acgtk-1.5.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://calligramme.loria.fr/acg/software/acg-1.3.1-20170303.tar.gz;
|
url = http://calligramme.loria.fr/acg/software/acg-1.5.0-20181019.tar.gz;
|
||||||
sha256 = "1hhrf6bx2x2wbv5ldn4fnxhpr9lyrj3zh1vcnx8wf8f06ih4rzfq";
|
sha256 = "14n003gxzw5w79hlpw1ja4nq97jqf9zqyg00ihvpxw4bv9jlm8jm";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = with ocamlPackages; [
|
buildInputs = [ dune ] ++ (with ocamlPackages; [
|
||||||
ocaml findlib camlp4 ansiterminal biniou bolt cairo2 dypgen easy-format ocf yojson
|
ocaml findlib ansiterminal cairo2 fmt logs menhir mtime ocf
|
||||||
];
|
]);
|
||||||
|
|
||||||
patches = [ ./install-emacs-to-site-lisp.patch
|
buildPhase = "dune build";
|
||||||
./use-nix-ocaml-byteflags.patch ];
|
|
||||||
|
|
||||||
postPatch = optionalString (camlp4 != null) ''
|
inherit (dune) installPhase;
|
||||||
substituteInPlace src/Makefile.master.in \
|
|
||||||
--replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4/"
|
|
||||||
'' + optionalString (versionAtLeast (stdenv.lib.getVersion ocamlPackages.yojson) "1.4") ''
|
|
||||||
substituteInPlace src/scripting/Makefile.in --replace yojson.cmo yojson.cma
|
|
||||||
'';
|
|
||||||
|
|
||||||
# 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 ${ocamlPackages.ansiterminal}/lib/ocaml/${ocaml.version}/site-lib/ANSITerminal";
|
|
||||||
|
|
||||||
buildFlags = optionalString buildBytecode "byte"
|
|
||||||
+ " "
|
|
||||||
+ optionalString buildNative "opt";
|
|
||||||
|
|
||||||
installTargets = "install"
|
|
||||||
+ " " + optionalString installExamples "install-examples"
|
|
||||||
+ " " + optionalString installEmacsMode "install-emacs";
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://calligramme.loria.fr/acg/;
|
homepage = http://calligramme.loria.fr/acg/;
|
||||||
description = "A toolkit for developing ACG signatures and lexicon";
|
description = "A toolkit for developing ACG signatures and lexicon";
|
||||||
license = licenses.cecill20;
|
license = licenses.cecill20;
|
||||||
platforms = ocaml.meta.platforms or [];
|
inherit (ocamlPackages.ocaml.meta) platforms;
|
||||||
maintainers = [ maintainers.jirkamarsik ];
|
maintainers = [ maintainers.jirkamarsik ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
--- 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)/.
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- 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
|
|
||||||
|
|
|
@ -21340,9 +21340,7 @@ with pkgs;
|
||||||
|
|
||||||
abella = callPackage ../applications/science/logic/abella {};
|
abella = callPackage ../applications/science/logic/abella {};
|
||||||
|
|
||||||
acgtk = callPackage ../applications/science/logic/acgtk {
|
acgtk = callPackage ../applications/science/logic/acgtk {};
|
||||||
ocamlPackages = ocaml-ng.ocamlPackages_4_05;
|
|
||||||
};
|
|
||||||
|
|
||||||
alt-ergo = callPackage ../applications/science/logic/alt-ergo {};
|
alt-ergo = callPackage ../applications/science/logic/alt-ergo {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue