Files
nixpkgs/pkgs/applications/science/logic/why3/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

118 lines
2.1 KiB
Nix

{
callPackage,
fetchurl,
lib,
stdenv,
ocamlPackages,
coqPackages,
rubber,
hevea,
emacs,
version ? "1.8.2",
ideSupport ? true,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "why3";
inherit version;
src = fetchurl {
url = "https://why3.gitlabpages.inria.fr/releases/${pname}-${version}.tar.gz";
hash =
{
"1.8.2" = "sha256-t9ES7dW8zmvM4AI9K8g06yrhocQteupE/6Ek1km1C+o=";
"1.7.2" = "sha256-VaSG/FiO2MDdSSFXGJJrIylQx0LPwtT8AF7TpPVZhCQ=";
"1.6.0" = "sha256-hFvM6kHScaCtcHCc6Vezl9CR7BFbiKPoTEh7kj0ZJxw=";
}
."${version}";
};
strictDeps = true;
nativeBuildInputs =
lib.optional ideSupport wrapGAppsHook3
++ (with ocamlPackages; [
ocaml
findlib
menhir
])
++ [
# Coq Support
coqPackages.coq
];
buildInputs =
with ocamlPackages;
[
ocamlgraph
zarith
# Emacs compilation of why3.el
emacs
# Documentation
rubber
hevea
]
++
lib.optional ideSupport
# GUI
lablgtk3-sourceview3
++ [
# WebIDE
js_of_ocaml
js_of_ocaml-ppx
# S-expression output for why3pp
ppx_deriving
ppx_sexp_conv
]
++
# Coq Support
(with coqPackages; [
coq
flocq
]);
propagatedBuildInputs = with ocamlPackages; [
camlzip
menhirLib
(if lib.versionAtLeast version "1.8.0" then zarith else num)
re
sexplib
];
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/
'';
passthru.withProvers = callPackage ./with-provers.nix { };
meta = {
description = "Platform for deductive program verification";
homepage = "https://why3.lri.fr/";
license = lib.licenses.lgpl21;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
thoughtpolice
vbgl
];
};
}