nixpkgs-suyu/pkgs/applications/science/logic/lean/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2020-05-16 11:20:00 +02:00
{ stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
2016-12-08 16:29:33 +01:00
stdenv.mkDerivation rec {
pname = "lean";
2020-11-11 12:58:11 +01:00
version = "3.23.0";
2016-12-08 16:29:33 +01:00
src = fetchFromGitHub {
owner = "leanprover-community";
2016-12-08 16:29:33 +01:00
repo = "lean";
2017-01-20 10:59:54 +01:00
rev = "v${version}";
2020-11-11 12:58:11 +01:00
sha256 = "09mklc1p6ms1jayg2f89hqfmhca3h5744lli936l38ypn1d00sxx";
2016-12-08 16:29:33 +01:00
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp ];
2016-12-08 16:29:33 +01:00
enableParallelBuilding = true;
2020-11-04 16:32:56 +01:00
cmakeDir = "../src";
# Running the tests is required to build the *.olean files for the core
# library.
doCheck = true;
postPatch = "patchShebangs .";
2016-12-08 16:29:33 +01:00
2020-05-16 11:20:00 +02:00
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace $out/bin/leanpkg \
--replace "greadlink" "${coreutils}/bin/readlink"
'';
2016-12-08 16:29:33 +01:00
meta = with stdenv.lib; {
description = "Automatic and interactive theorem prover";
2020-03-04 07:26:01 +01:00
homepage = "https://leanprover.github.io/";
2020-03-13 10:20:00 +01:00
changelog = "https://github.com/leanprover-community/lean/blob/v${version}/doc/changes.md";
2016-12-08 16:29:33 +01:00
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice gebner ];
};
}