2009-11-05 16:08:12 +01:00
|
|
|
# TODO:
|
2011-04-05 13:59:25 +02:00
|
|
|
# - coq needs to be invoked with the explicit path to the ssreflect theory
|
|
|
|
# e.g. coqide -R ~/.nix-profile/lib/coq/user-contrib/ ''
|
2009-11-05 16:08:12 +01:00
|
|
|
|
2012-05-17 00:04:02 +02:00
|
|
|
{stdenv, fetchurl, ocaml, camlp5, coq, makeWrapper}:
|
2009-11-05 16:08:12 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "ssreflect";
|
2012-05-17 00:04:02 +02:00
|
|
|
version = "1.3pl4";
|
2009-11-05 16:08:12 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
webpage = http://www.msr-inria.inria.fr/Projects/math-components;
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit name;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2011-04-05 13:59:25 +02:00
|
|
|
url = "${webpage}/${name}.tar.gz";
|
2012-05-17 00:04:02 +02:00
|
|
|
sha256 = "1ha3iiqq79pgll5ra9z0xdi3d3dr3wb9f5vsm4amy884l5anva02";
|
2009-11-05 16:08:12 +01:00
|
|
|
};
|
|
|
|
|
2012-05-17 00:04:02 +02:00
|
|
|
buildInputs = [ ocaml camlp5 coq makeWrapper ];
|
|
|
|
|
|
|
|
patches = [ ./static.patch ];
|
2009-11-05 16:08:12 +01:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
cd src
|
|
|
|
coqmktop -ide -opt ssreflect.cmx -o ../bin/ssrcoqide
|
2012-05-17 00:04:02 +02:00
|
|
|
cd ..
|
2009-11-05 16:08:12 +01:00
|
|
|
'';
|
|
|
|
|
2011-04-05 13:59:25 +02:00
|
|
|
installPhase = ''
|
|
|
|
COQLIB=$out/lib/coq make -f Makefile.coq install -e
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2012-05-17 00:04:02 +02:00
|
|
|
cp bin/* $out/bin
|
2012-05-28 21:45:14 +02:00
|
|
|
# for i in $out/bin/*; do
|
|
|
|
# wrapProgram "$i" \
|
|
|
|
# --add-flags "-R" \
|
|
|
|
# --add-flags "$out/lib/coq/user-contrib/Ssreflect" \
|
|
|
|
# --add-flags "Ssreflect"
|
|
|
|
# done
|
2009-11-05 16:08:12 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Small Scale Reflection extension for Coq";
|
|
|
|
longDescription = ''
|
|
|
|
Small Scale Reflection (ssreflect) is an extension of the Coq Theorem
|
|
|
|
Prover which enable a formal proof methodology based on the pervasive
|
|
|
|
use of computation with symbolic representation
|
|
|
|
'';
|
|
|
|
homepage = webpage;
|
|
|
|
license = "CeCILL B FREE SOFTWARE LICENSE or CeCILL FREE SOFTWARE LICENSE";
|
2012-05-17 00:04:02 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
2009-11-05 16:08:12 +01:00
|
|
|
};
|
|
|
|
}
|