2021-10-14 09:45:23 +02:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, eprover, ocaml, camlp4, perl, zlib }:
|
2010-12-01 22:29:42 +01:00
|
|
|
|
2016-07-31 13:57:29 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "leo2";
|
2021-10-14 09:45:23 +02:00
|
|
|
version = "1.7.0";
|
2016-07-31 13:57:29 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://page.mi.fu-berlin.de/cbenzmueller/leo/leo2_v${version}.tgz";
|
2021-10-14 09:45:23 +02:00
|
|
|
sha256 = "sha256:1b2q7vsz6s9ighypsigqjm1mzjiq3xgnz5id5ssb4rh9zm190r82";
|
2010-12-01 22:29:42 +01:00
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-10-14 09:45:23 +02:00
|
|
|
buildInputs = [ eprover ocaml camlp4 perl zlib ];
|
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
2010-12-01 22:29:42 +01:00
|
|
|
|
2016-07-31 13:57:29 +02:00
|
|
|
buildFlags = [ "opt" ];
|
2010-12-01 22:29:42 +01:00
|
|
|
|
2016-07-31 13:57:29 +02:00
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
|
|
|
|
|
|
postInstall = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/etc"
|
2010-12-01 22:29:42 +01:00
|
|
|
echo -e "e = ${eprover}/bin/eprover\\nepclextract = ${eprover}/bin/epclextract" > "$out/etc/leoatprc"
|
|
|
|
|
2016-07-31 13:57:29 +02:00
|
|
|
wrapProgram $out/bin/leo \
|
|
|
|
--add-flags "--atprc $out/etc/leoatprc"
|
|
|
|
'';
|
2014-08-12 01:57:40 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2010-12-01 22:29:42 +01:00
|
|
|
description = "A high-performance typed higher order prover";
|
2016-07-31 13:57:29 +02:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.bsd3;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.leoprover.org/";
|
2010-12-01 22:29:42 +01:00
|
|
|
};
|
2016-07-31 13:57:29 +02:00
|
|
|
}
|