My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/applications/science/logic/lean/default.nix

40 lines
1.0 KiB

{ lib, stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
stdenv.mkDerivation rec {
pname = "lean";
version = "3.30.0";
src = fetchFromGitHub {
owner = "leanprover-community";
repo = "lean";
rev = "v${version}";
sha256 = "sha256-gJhbkl19iilNyfCt2TfPmghYA3yCjg6kS+yk/x/k14Y=";
};
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 ];
};
}