depot/third_party/nixpkgs/pkgs/applications/science/logic/lean/default.nix
Default email eefb417d14 Project import generated by Copybara.
GitOrigin-RevId: a52e974cff8fb80c427e0d55c01b3b8c770ccec4
2020-11-06 01:33:48 +01:00

40 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
stdenv.mkDerivation rec {
pname = "lean";
version = "3.21.0";
src = fetchFromGitHub {
owner = "leanprover-community";
repo = "lean";
rev = "v${version}";
sha256 = "1c7f2x6hdamjkr50761gcb5mg8hhlc75k1mf18vn1k9zsy1gxlgz";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp ];
enableParallelBuilding = true;
cmakeDir = "../src";
# Running the tests is required to build the *.olean files for the core
# library.
doCheck = true;
postPatch = "patchShebangs .";
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 ];
};
}