about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/logic/lean2/default.nix
blob: 4e1415d3961db52700a0428c1045a1f8b0f3a0b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ stdenv, fetchFromGitHub, cmake, gmp, mpfr, python
, gperftools, ninja, makeWrapper }:

stdenv.mkDerivation rec {
  name = "lean2-${version}";
  version = "2017-07-22";

  src = fetchFromGitHub {
    owner  = "leanprover";
    repo   = "lean2";
    rev    = "34dbd6c3ae612186b8f0f80d12fbf5ae7a059ec9";
    sha256 = "1xv3j487zhh1zf2b4v19xzw63s2sgjhg8d62a0kxxyknfmdf3khl";
  };

  buildInputs = [ gmp mpfr cmake python gperftools ninja makeWrapper ];
  enableParallelBuilding = true;

  preConfigure = ''
    patchShebangs bin/leantags
    cd src
  '';

  cmakeFlags = [ "-GNinja" ];

  postInstall = ''
    wrapProgram $out/bin/linja --prefix PATH : $out/bin:${ninja}/bin
  '';

  meta = with stdenv.lib; {
    description = "Automatic and interactive theorem prover (version with HoTT support)";
    homepage    = "http://leanprover.github.io";
    license     = licenses.asl20;
    platforms   = platforms.unix;
    maintainers = with maintainers; [ thoughtpolice gebner ];
  };
}