2022-10-21 18:38:19 +00:00
|
|
|
{ callPackage, fetchurl, lib, stdenv
|
2024-01-02 11:29:13 +00:00
|
|
|
, ocamlPackages, coqPackages, rubber, hevea, emacs
|
2024-05-15 15:35:15 +00:00
|
|
|
, version ? "1.7.2"
|
2024-02-07 01:22:34 +00:00
|
|
|
, ideSupport ? true
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "why3";
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-05 16:20:37 +00:00
|
|
|
url = "https://why3.gitlabpages.inria.fr/releases/${pname}-${version}.tar.gz";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = {
|
2024-05-15 15:35:15 +00:00
|
|
|
"1.7.2" = "sha256-VaSG/FiO2MDdSSFXGJJrIylQx0LPwtT8AF7TpPVZhCQ=";
|
2024-01-02 11:29:13 +00:00
|
|
|
"1.6.0" = "sha256-hFvM6kHScaCtcHCc6Vezl9CR7BFbiKPoTEh7kj0ZJxw=";
|
|
|
|
}."${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
nativeBuildInputs = lib.optional ideSupport
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2024-02-07 01:22:34 +00:00
|
|
|
++ (with ocamlPackages; [
|
2023-02-09 11:40:11 +00:00
|
|
|
ocaml findlib menhir
|
2024-02-07 01:22:34 +00:00
|
|
|
]) ++ [
|
2023-02-09 11:40:11 +00:00
|
|
|
# Coq Support
|
|
|
|
coqPackages.coq
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = with ocamlPackages; [
|
2023-02-09 11:40:11 +00:00
|
|
|
ocamlgraph zarith
|
2020-04-24 23:36:52 +00:00
|
|
|
# Emacs compilation of why3.el
|
|
|
|
emacs
|
|
|
|
# Documentation
|
|
|
|
rubber hevea
|
2024-02-07 01:22:34 +00:00
|
|
|
] ++ lib.optional ideSupport
|
2020-04-24 23:36:52 +00:00
|
|
|
# GUI
|
2021-06-28 23:13:55 +00:00
|
|
|
lablgtk3-sourceview3
|
2024-02-07 01:22:34 +00:00
|
|
|
++ [
|
2020-04-24 23:36:52 +00:00
|
|
|
# WebIDE
|
|
|
|
js_of_ocaml js_of_ocaml-ppx
|
2021-06-28 23:13:55 +00:00
|
|
|
# S-expression output for why3pp
|
2022-06-16 17:23:12 +00:00
|
|
|
ppx_deriving ppx_sexp_conv ]
|
|
|
|
++
|
2020-04-24 23:36:52 +00:00
|
|
|
# Coq Support
|
2022-06-16 17:23:12 +00:00
|
|
|
(with coqPackages; [ coq flocq ])
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
propagatedBuildInputs = with ocamlPackages; [ camlzip menhirLib num re sexplib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
configureFlags = [ "--enable-verbose-make"
|
|
|
|
(lib.enableFeature ideSupport "ide")
|
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installTargets = [ "install" "install-lib" ];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/lib
|
|
|
|
mv $out/lib/ocaml $dev/lib/
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
passthru.withProvers = callPackage ./with-provers.nix {};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A platform for deductive program verification";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://why3.lri.fr/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice vbgl ];
|
|
|
|
};
|
|
|
|
}
|