Commit | Line | Data |
---|---|---|
db1bc0d9 | 1 | ;;; GNU Guix --- Functional package management for GNU |
a3143063 | 2 | ;;; Copyright © 2019 Amin Bandali <mab@gnu.org> |
db1bc0d9 AB |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (gnu packages lean) | |
20 | #:use-module (gnu packages multiprecision) | |
21 | #:use-module (guix build-system cmake) | |
22 | #:use-module ((guix licenses) #:prefix license:) | |
23 | #:use-module (guix packages) | |
24 | #:use-module (guix git-download)) | |
25 | ||
26 | (define-public lean | |
27 | (package | |
28 | (name "lean") | |
29 | (version "3.5.0") | |
30 | (home-page "https://github.com/leanprover-community/lean") | |
31 | (source (origin | |
32 | (method git-fetch) | |
33 | (uri (git-reference (url home-page) | |
34 | (commit (string-append "v" version)))) | |
35 | (file-name (git-file-name name version)) | |
36 | (sha256 | |
37 | (base32 | |
38 | "1fdblq8ckrv6wqxfl4ybcs3ybfq7y096c9f5j4j75ymb14r401lr")))) | |
39 | (build-system cmake-build-system) | |
40 | (inputs | |
41 | `(("gmp" ,gmp))) | |
42 | (arguments | |
43 | `(#:build-type "Release" ; default upstream build type | |
44 | #:phases | |
45 | (modify-phases %standard-phases | |
46 | (add-after 'patch-source-shebangs 'patch-tests-shebangs | |
47 | (lambda _ | |
48 | (let ((sh (which "sh")) | |
49 | (bash (which "bash"))) | |
50 | (substitute* (find-files "tests/lean" "\\.sh$") | |
51 | (("#![[:blank:]]?/bin/sh") | |
52 | (string-append "#!" sh)) | |
53 | (("#![[:blank:]]?/bin/bash") | |
54 | (string-append "#!" bash)) | |
55 | (("#![[:blank:]]?usr/bin/env bash") | |
56 | (string-append "#!" bash))) | |
57 | #t))) | |
58 | (add-before 'configure 'chdir-to-src | |
59 | (lambda _ (chdir "src") #t))))) | |
60 | (synopsis "The Lean theorem prover and programming language") | |
61 | (description | |
62 | "Lean is a theorem prover and programming language with a small trusted | |
63 | core based on dependent typed theory, aiming to bridge the gap between | |
64 | interactive and automated theorem proving.") | |
65 | (license license:asl2.0))) |