2009-11-02 12:44:27 +01:00
|
|
|
# TODO:
|
|
|
|
# - coqide compilation should be optional or (better) separate;
|
|
|
|
# - coqide libraries are not installed;
|
2008-06-04 17:10:05 +02:00
|
|
|
|
2009-11-02 12:44:27 +01:00
|
|
|
{stdenv, fetchurl, ocaml, camlp5, lablgtk, ncurses}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
pname = "coq";
|
|
|
|
version = "8.2pl1";
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
2008-06-04 17:10:05 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-11-02 12:44:27 +01:00
|
|
|
url = "http://coq.inria.fr/V${version}/files/${name}.tar.gz";
|
|
|
|
sha256 = "7c15acfd369111e51d937cce632d22fc77a6718a5ac9f2dd2dcbdfab4256ae0c";
|
2008-06-04 17:10:05 +02:00
|
|
|
};
|
|
|
|
|
2009-11-02 12:44:27 +01:00
|
|
|
buildInputs = [ ocaml camlp5 ncurses lablgtk ];
|
2008-06-04 17:10:05 +02:00
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
2009-11-02 12:44:27 +01:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
"-camldir ${ocaml}/bin " +
|
|
|
|
"-camlp5dir ${camlp5}/lib/ocaml/camlp5 " +
|
|
|
|
"-lablgtkdir ${lablgtk}/lib/ocaml/lablgtk2 " +
|
|
|
|
"-opt -coqide opt";
|
|
|
|
|
|
|
|
buildFlags = "world"; # Debug with "world VERBOSE=1";
|
|
|
|
|
|
|
|
patches = [ ./configure.patch.gz ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
BASH=$(type -tp bash)
|
2008-06-04 17:10:05 +02:00
|
|
|
UNAME=$(type -tp uname)
|
|
|
|
MV=$(type -tp mv)
|
2009-11-02 12:44:27 +01:00
|
|
|
RM=$(type -tp rm)
|
|
|
|
substituteInPlace configure --replace "/bin/bash" "$BASH" \
|
|
|
|
--replace "/bin/uname" "$UNAME"
|
|
|
|
substituteInPlace Makefile --replace "/bin/bash" "$BASH" \
|
|
|
|
--replace "/bin/mv" "$MV" \
|
2008-06-04 17:10:05 +02:00
|
|
|
--replace "/bin/rm" "$RM"
|
2009-11-02 12:44:27 +01:00
|
|
|
substituteInPlace Makefile.stage1 --replace "/bin/bash" "$BASH"
|
|
|
|
substituteInPlace install.sh --replace "/bin/bash" "$BASH"
|
|
|
|
substituteInPlace dev/v8-syntax/check-grammar --replace "/bin/bash" "$BASH"
|
|
|
|
substituteInPlace scripts/coqmktop.ml --replace \
|
|
|
|
"\"-I\"; \"+lablgtk2\"" \
|
|
|
|
"\"-I\"; \"${lablgtk}/lib/ocaml/lablgtk2\"; \"-I\"; \"${lablgtk}/lib/ocaml/stublibs\""
|
2008-06-04 17:10:05 +02:00
|
|
|
'';
|
|
|
|
|
2009-11-02 12:44:27 +01: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";
|
|
|
|
};
|
|
|
|
}
|