37 lines
979 B
Nix
Raw Normal View History

2020-05-16 04:20:00 -05:00
{ stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
2016-12-08 10:29:33 -05:00
stdenv.mkDerivation rec {
pname = "lean";
2020-08-02 04:55:59 +00:00
version = "3.18.4";
2016-12-08 10:29:33 -05:00
src = fetchFromGitHub {
owner = "leanprover-community";
2016-12-08 10:29:33 -05:00
repo = "lean";
2017-01-20 10:59:54 +01:00
rev = "v${version}";
2020-08-02 04:55:59 +00:00
sha256 = "1pmc2wi1pa346w89ayrrjv9xk6v6myg2zmx1wj4pd9qxv7ivrbsn";
2016-12-08 10:29:33 -05:00
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp ];
2016-12-08 10:29:33 -05:00
enableParallelBuilding = true;
preConfigure = ''
cd src
'';
2020-05-16 04:20:00 -05:00
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace $out/bin/leanpkg \
--replace "greadlink" "${coreutils}/bin/readlink"
'';
2016-12-08 10:29:33 -05:00
meta = with stdenv.lib; {
description = "Automatic and interactive theorem prover";
2020-03-04 06:26:01 +00:00
homepage = "https://leanprover.github.io/";
2020-03-13 04:20:00 -05:00
changelog = "https://github.com/leanprover-community/lean/blob/v${version}/doc/changes.md";
2016-12-08 10:29:33 -05:00
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice gebner ];
};
}