2021-10-17 02:12:59 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, eprover, ocaml, camlp4, perl, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "leo2";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://page.mi.fu-berlin.de/cbenzmueller/leo/leo2_v${version}.tgz";
|
2021-10-17 02:12:59 +00:00
|
|
|
sha256 = "sha256:1b2q7vsz6s9ighypsigqjm1mzjiq3xgnz5id5ssb4rh9zm190r82";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper eprover ocaml camlp4 perl ];
|
|
|
|
buildInputs = [ zlib ];
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://github.com/niklasso/minisat/commit/7eb6015313561a2586032574788fcb133eeaa19f.patch";
|
|
|
|
stripLen = 1;
|
|
|
|
extraPrefix = "lib/";
|
|
|
|
sha256 = "sha256:01ln7hi6nvvkqkhn9hciqizizz5qspvqffgksvgmzn9x7kdd9pnh";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd src
|
|
|
|
patchShebangs configure
|
|
|
|
substituteInPlace Makefile.pre \
|
|
|
|
--replace '+camlp4' "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildFlags = [ "opt" ];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-reserved-user-defined-literal";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/etc"
|
|
|
|
echo -e "e = ${eprover}/bin/eprover\\nepclextract = ${eprover}/bin/epclextract" > "$out/etc/leoatprc"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/leo \
|
|
|
|
--add-flags "--atprc $out/etc/leoatprc"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A high-performance typed higher order prover";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "leo";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.raskin ];
|
2023-03-08 16:32:21 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "http://www.leoprover.org/";
|
|
|
|
};
|
|
|
|
}
|