nixpkgs/pkgs/applications/science/logic/why3/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.7 KiB
Nix
Raw Normal View History

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