Mirror of GNU Guix
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.

65 lines
2.6 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2019 Amin Bandali <bandali@gnu.org>
  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. (define-module (gnu packages lean)
  19. #:use-module (gnu packages multiprecision)
  20. #:use-module (guix build-system cmake)
  21. #:use-module ((guix licenses) #:prefix license:)
  22. #:use-module (guix packages)
  23. #:use-module (guix git-download))
  24. (define-public lean
  25. (package
  26. (name "lean")
  27. (version "3.5.0")
  28. (home-page "https://github.com/leanprover-community/lean")
  29. (source (origin
  30. (method git-fetch)
  31. (uri (git-reference (url home-page)
  32. (commit (string-append "v" version))))
  33. (file-name (git-file-name name version))
  34. (sha256
  35. (base32
  36. "1fdblq8ckrv6wqxfl4ybcs3ybfq7y096c9f5j4j75ymb14r401lr"))))
  37. (build-system cmake-build-system)
  38. (inputs
  39. `(("gmp" ,gmp)))
  40. (arguments
  41. `(#:build-type "Release" ; default upstream build type
  42. #:phases
  43. (modify-phases %standard-phases
  44. (add-after 'patch-source-shebangs 'patch-tests-shebangs
  45. (lambda _
  46. (let ((sh (which "sh"))
  47. (bash (which "bash")))
  48. (substitute* (find-files "tests/lean" "\\.sh$")
  49. (("#![[:blank:]]?/bin/sh")
  50. (string-append "#!" sh))
  51. (("#![[:blank:]]?/bin/bash")
  52. (string-append "#!" bash))
  53. (("#![[:blank:]]?usr/bin/env bash")
  54. (string-append "#!" bash)))
  55. #t)))
  56. (add-before 'configure 'chdir-to-src
  57. (lambda _ (chdir "src") #t)))))
  58. (synopsis "The Lean theorem prover and programming language")
  59. (description
  60. "Lean is a theorem prover and programming language with a small trusted
  61. core based on dependent typed theory, aiming to bridge the gap between
  62. interactive and automated theorem proving.")
  63. (license license:asl2.0)))