depot/third_party/nixpkgs/pkgs/applications/science/logic/lean/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

36 lines
979 B
Nix

{ stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
stdenv.mkDerivation rec {
pname = "lean";
version = "3.18.4";
src = fetchFromGitHub {
owner = "leanprover-community";
repo = "lean";
rev = "v${version}";
sha256 = "1pmc2wi1pa346w89ayrrjv9xk6v6myg2zmx1wj4pd9qxv7ivrbsn";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp ];
enableParallelBuilding = true;
preConfigure = ''
cd src
'';
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace $out/bin/leanpkg \
--replace "greadlink" "${coreutils}/bin/readlink"
'';
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 ];
};
}