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

37 lines
979 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
stdenv.mkDerivation rec {
pname = "lean";
version = "3.16.5";
src = fetchFromGitHub {
owner = "leanprover-community";
repo = "lean";
rev = "v${version}";
sha256 = "0s1ay6qgpkxhygfbfrl1cw2pd8bpgw2dw71rzhza20ndqwk8nqs5";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp ];
enableParallelBuilding = true;
preConfigure = ''
cd src
'';
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 ];
};
}