commit
513d06cf6f
60
pkgs/applications/science/logic/lean4/default.nix
Normal file
60
pkgs/applications/science/logic/lean4/default.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, git
|
||||
, gmp
|
||||
, perl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lean4";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leanprover";
|
||||
repo = "lean4";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-3Ni+NiD0iSsOruUyRpBd+aC0TZNYfOLhwqCpPHPruPg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/CMakeLists.txt \
|
||||
--replace 'set(GIT_SHA1 "")' 'set(GIT_SHA1 "${src.rev}")'
|
||||
|
||||
# Remove tests that fails in sandbox.
|
||||
# It expects `sourceRoot` to be a git repository.
|
||||
rm -rf src/lake/examples/git/
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs stage0/src/bin/ src/bin/
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gmp
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
git
|
||||
perl
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_GITHASH=OFF"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatic and interactive theorem prover";
|
||||
homepage = "https://leanprover.github.io/";
|
||||
changelog = "https://github.com/leanprover/lean4/blob/${src.rev}/RELEASES.md";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ marsam ];
|
||||
mainProgram = "lean";
|
||||
};
|
||||
}
|
@ -39772,6 +39772,7 @@ with pkgs;
|
||||
|
||||
lean = callPackage ../applications/science/logic/lean { };
|
||||
lean2 = callPackage ../applications/science/logic/lean2 { };
|
||||
lean4 = callPackage ../applications/science/logic/lean4 { };
|
||||
lean3 = lean;
|
||||
elan = callPackage ../applications/science/logic/elan { };
|
||||
mathlibtools = with python3Packages; toPythonApplication mathlibtools;
|
||||
|
Loading…
Reference in New Issue
Block a user