2020-05-29 06:06:01 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lean";
|
2020-10-19 00:13:06 +00:00
|
|
|
version = "3.21.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "leanprover-community";
|
|
|
|
repo = "lean";
|
|
|
|
rev = "v${version}";
|
2020-10-19 00:13:06 +00:00
|
|
|
sha256 = "1c7f2x6hdamjkr50761gcb5mg8hhlc75k1mf18vn1k9zsy1gxlgz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ gmp ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
cmakeDir = "../src";
|
|
|
|
|
|
|
|
# Running the tests is required to build the *.olean files for the core
|
|
|
|
# library.
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
postPatch = "patchShebangs .";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace $out/bin/leanpkg \
|
|
|
|
--replace "greadlink" "${coreutils}/bin/readlink"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Automatic and interactive theorem prover";
|
|
|
|
homepage = "https://leanprover.github.io/";
|
|
|
|
changelog = "https://github.com/leanprover-community/lean/blob/v${version}/doc/changes.md";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice gebner ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|