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

40 lines
1 KiB
Nix
Raw Normal View History

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