framac: 18 -> 19 and update why3
This commit is contained in:
committed by
Vincent Laporte
parent
3ffe0dce2b
commit
3ab32ee8f6
@@ -0,0 +1,11 @@
|
||||
diff --git a/configure b/configure
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -4029,7 +4029,6 @@ fi
|
||||
|
||||
if test "$USEOCAMLFIND" = yes; then
|
||||
OCAMLFINDLIB=$(ocamlfind printconf stdlib)
|
||||
- OCAMLFIND=$(which ocamlfind)
|
||||
if test "$OCAMLFINDLIB" != "$OCAMLLIB"; then
|
||||
USEOCAMLFIND=no;
|
||||
echo "but your ocamlfind is not compatible with your ocamlc:"
|
||||
@@ -1,4 +1,5 @@
|
||||
{ fetchurl, stdenv, ocamlPackages, coq }:
|
||||
{ callPackage, fetchurl, stdenv
|
||||
, ocamlPackages, coqPackages, rubber, hevea, emacs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "why3-${version}";
|
||||
@@ -9,14 +10,34 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0xz001jhi71ja8vqrjz27v63bidrzj4qvg1yqarq6p4dmpxhk348";
|
||||
};
|
||||
|
||||
buildInputs = (with ocamlPackages; [
|
||||
ocaml findlib num lablgtk ocamlgraph zarith menhir ]) ++
|
||||
stdenv.lib.optionals (ocamlPackages.ocaml == coq.ocamlPackages.ocaml ) [
|
||||
coq ocamlPackages.camlp5
|
||||
];
|
||||
buildInputs = with ocamlPackages; [
|
||||
ocaml findlib ocamlgraph zarith menhir
|
||||
# Compressed Sessions
|
||||
# Emacs compilation of why3.el
|
||||
emacs
|
||||
# Documentation
|
||||
rubber hevea
|
||||
# GUI
|
||||
lablgtk
|
||||
# WebIDE
|
||||
js_of_ocaml js_of_ocaml-ppx
|
||||
# Coq Support
|
||||
coqPackages.coq coqPackages.flocq ocamlPackages.camlp5
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with ocamlPackages; [ camlzip num ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Remove unnecessary call to which
|
||||
patches = [ ./configure.patch ];
|
||||
|
||||
configureFlags = [ "--enable-verbose-make" ];
|
||||
|
||||
installTargets = [ "install" "install-lib" ];
|
||||
|
||||
passthru.withProvers = callPackage ./with-provers.nix {};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A platform for deductive program verification";
|
||||
homepage = "http://why3.lri.fr/";
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{ stdenv, makeWrapper, runCommand, symlinkJoin, why3 }:
|
||||
provers:
|
||||
let configAwkScript = runCommand "why3-conf.awk" { inherit provers; }
|
||||
''
|
||||
for p in $provers; do
|
||||
for b in $p/bin/*; do
|
||||
BASENAME=$(basename $b)
|
||||
echo "/^command =/{ gsub(\"$BASENAME\", \"$b\") }" >> $out
|
||||
done
|
||||
done
|
||||
echo '{ print }' >> $out
|
||||
'';
|
||||
in stdenv.mkDerivation {
|
||||
name = "${why3.name}-with-provers";
|
||||
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ why3 makeWrapper ] ++ provers;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/share/why3/
|
||||
why3 config --detect-provers -C $out/share/why3/why3.conf
|
||||
awk -i inplace -f ${configAwkScript} $out/share/why3/why3.conf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${why3}/bin/why3 $out/bin/why3 --add-flags "--extra-config $out/share/why3/why3.conf"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user