2009-11-02 11:44:27 +00:00
|
|
|
# TODO:
|
|
|
|
# - coqide compilation should be optional or (better) separate;
|
2008-06-04 16:10:05 +01:00
|
|
|
|
2010-12-20 10:32:22 +00:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, camlp5, lablgtk, ncurses}:
|
2009-11-02 11:44:27 +00:00
|
|
|
|
|
|
|
let
|
2012-05-16 23:04:02 +01:00
|
|
|
version = "8.3pl4";
|
2009-11-02 11:44:27 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-08-05 19:44:42 +01:00
|
|
|
name = "coq-${version}";
|
2008-06-04 16:10:05 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-08-05 19:44:42 +01:00
|
|
|
url = "http://coq.inria.fr/V${version}/files/coq-${version}.tar.gz";
|
2012-05-16 23:04:02 +01:00
|
|
|
sha256 = "17d3lmchmqir1rawnr52g78srg4wkd7clzpzfsivxc4y1zp6rwkr";
|
2008-06-04 16:10:05 +01:00
|
|
|
};
|
|
|
|
|
2010-12-20 10:32:22 +00:00
|
|
|
buildInputs = [ ocaml findlib camlp5 ncurses lablgtk ];
|
2008-06-04 16:10:05 +01:00
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
2009-11-02 11:44:27 +00:00
|
|
|
|
2010-12-20 10:32:22 +00:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
|
|
|
-camldir ${ocaml}/bin
|
|
|
|
-camlp5dir $(ocamlfind query camlp5)
|
2011-01-02 17:25:18 +00:00
|
|
|
-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -opt -coqide opt
|
2010-12-20 10:32:22 +00:00
|
|
|
)
|
|
|
|
'';
|
2009-11-02 11:44:27 +00:00
|
|
|
|
|
|
|
buildFlags = "world"; # Debug with "world VERBOSE=1";
|
|
|
|
|
2012-03-17 16:30:23 +00:00
|
|
|
patches = [ ./configure.patch ];
|
2009-11-02 11:44:27 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2008-06-04 16:10:05 +01:00
|
|
|
UNAME=$(type -tp uname)
|
2009-11-02 11:44:27 +00:00
|
|
|
RM=$(type -tp rm)
|
2010-11-04 11:24:27 +00:00
|
|
|
substituteInPlace configure --replace "/bin/uname" "$UNAME"
|
|
|
|
substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
|
2009-11-02 11:44:27 +00:00
|
|
|
substituteInPlace scripts/coqmktop.ml --replace \
|
|
|
|
"\"-I\"; \"+lablgtk2\"" \
|
2011-01-03 13:49:15 +00:00
|
|
|
"\"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)\"; \"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/stublibs)\""
|
2008-06-04 16:10:05 +01:00
|
|
|
'';
|
|
|
|
|
2011-04-05 12:59:25 +01:00
|
|
|
# This post install step is needed to build ssrcoqide from the ssreflect package
|
|
|
|
# It could be made optional, but I see little harm in including it in the default
|
|
|
|
# distribution -- roconnor
|
2010-05-18 14:40:19 +01:00
|
|
|
postInstall = ''
|
|
|
|
cp ide/*.cmi ide/ide.*a $out/lib/coq/ide/
|
|
|
|
'';
|
|
|
|
|
2009-11-02 11:44:27 +00:00
|
|
|
meta = {
|
|
|
|
description = "Coq proof assistant";
|
|
|
|
longDescription = ''
|
|
|
|
Coq is a formal proof management system. It provides a formal language
|
|
|
|
to write mathematical definitions, executable algorithms and theorems
|
|
|
|
together with an environment for semi-interactive development of
|
|
|
|
machine-checked proofs.
|
|
|
|
'';
|
|
|
|
homepage = "http://coq.inria.fr";
|
|
|
|
license = "LGPL";
|
2012-05-16 23:04:02 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
2009-11-02 11:44:27 +00:00
|
|
|
};
|
|
|
|
}
|