depot/third_party/nixpkgs/pkgs/applications/science/logic/lean/default.nix
Default email 1ae14203fc Project import generated by Copybara.
GitOrigin-RevId: 68398d2dd50efc2d878bf0f83bbc8bc323b6b0e0
2021-01-17 01:15:33 +01:00

39 lines
1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
stdenv.mkDerivation rec {
pname = "lean";
version = "3.24.0";
src = fetchFromGitHub {
owner = "leanprover-community";
repo = "lean";
rev = "v${version}";
sha256 = "npzBuZ37KrUYwC0TglryVTqui/3/t1ma1Zjpnty0d7c=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp ];
cmakeDir = "../src";
# Running the tests is required to build the *.olean files for the core
# library.
doCheck = true;
postPatch = "patchShebangs .";
postInstall = lib.optionalString stdenv.isDarwin ''
substituteInPlace $out/bin/leanpkg \
--replace "greadlink" "${coreutils}/bin/readlink"
'';
meta = with 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 ];
};
}