prolog.scm 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  3. ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
  5. ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages prolog)
  22. #:use-module (guix download)
  23. #:use-module (guix git-download)
  24. #:use-module ((guix licenses) #:prefix license:)
  25. #:use-module (guix packages)
  26. #:use-module (guix build-system cmake)
  27. #:use-module (guix build-system gnu)
  28. #:use-module (gnu packages backup)
  29. #:use-module (gnu packages compression)
  30. #:use-module (gnu packages fontutils)
  31. #:use-module (gnu packages image)
  32. #:use-module (gnu packages libunwind)
  33. #:use-module (gnu packages multiprecision)
  34. #:use-module (gnu packages perl)
  35. #:use-module (gnu packages pkg-config)
  36. #:use-module (gnu packages readline)
  37. #:use-module (gnu packages texinfo)
  38. #:use-module (gnu packages tls)
  39. #:use-module (gnu packages xorg)
  40. #:use-module (srfi srfi-1))
  41. (define-public gprolog
  42. (package
  43. (name "gprolog")
  44. (version "1.5.0")
  45. (source
  46. (origin
  47. (method url-fetch)
  48. ;; Recent versions are not hosted on the GNU mirrors.
  49. (uri (list (string-append "http://gprolog.org/gprolog-" version
  50. ".tar.gz")
  51. (string-append "mirror://gnu/gprolog/gprolog-" version
  52. ".tar.gz")))
  53. (sha256
  54. (base32
  55. "009ca4wn2q6xdmb0js0vz647cw5ygsqyyqc9svmjgahg7js441k7"))))
  56. (build-system gnu-build-system)
  57. (arguments
  58. `(#:configure-flags
  59. (list (string-append
  60. "--with-install-dir=" %output "/share/gprolog"))
  61. #:phases
  62. (modify-phases %standard-phases
  63. (add-before 'configure 'change-dir
  64. (lambda _
  65. (chdir "src"))))))
  66. (home-page "https://www.gnu.org/software/gprolog/")
  67. (synopsis "Prolog compiler")
  68. (description
  69. "GNU Prolog is a standards-compliant Prolog compiler with constraint
  70. solving over finite domains. It accepts Prolog+ constraint programs and
  71. produces a compiled, native binary which can function in a stand-alone
  72. manner. It also features an interactive interpreter.")
  73. (license (list license:gpl2+
  74. license:lgpl3+))
  75. ;; See 'configure' for the list of supported architectures.
  76. (supported-systems (fold delete
  77. %supported-systems
  78. '("armhf-linux" "mips64el-linux")))))
  79. (define-public swi-prolog
  80. (package
  81. (name "swi-prolog")
  82. (version "8.3.20")
  83. (source (origin
  84. (method git-fetch)
  85. (uri (git-reference
  86. (url "https://github.com/SWI-Prolog/swipl-devel")
  87. (recursive? #t) ; TODO: Determine if this can be split out.
  88. (commit (string-append "V" version))))
  89. (file-name (git-file-name name version))
  90. (sha256
  91. (base32
  92. "1g0v9cmz8zvzc1n0si7sn6522xwzbhj2b8967ibs6prinrpjc8d6"))))
  93. (build-system cmake-build-system)
  94. (arguments
  95. `(#:parallel-build? #t
  96. #:tests? #t
  97. #:configure-flags
  98. (list "-DINSTALL_DOCUMENTATION=ON"
  99. "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
  100. #:phases
  101. (modify-phases %standard-phases
  102. ;; XXX: Delete the test phase that attempts to write to the
  103. ;; immutable store.
  104. (add-after 'unpack 'delete-failing-tests
  105. (lambda _
  106. (substitute* "src/CMakeLists.txt"
  107. ((" save") ""))
  108. (substitute* "src/test.pl"
  109. (("testdir\\('Tests/save'\\).") ""))
  110. (with-directory-excursion "src/Tests"
  111. (for-each delete-file-recursively
  112. '("save")))
  113. #t)))))
  114. (native-inputs
  115. `(("zlib" ,zlib)
  116. ("gmp" ,gmp)
  117. ("readline" ,readline)
  118. ("texinfo" ,texinfo)
  119. ("libarchive" ,libarchive)
  120. ("libunwind" ,libunwind)
  121. ("libjpeg" ,libjpeg-turbo)
  122. ("libxft" ,libxft)
  123. ("fontconfig" ,fontconfig)
  124. ("perl" ,perl)
  125. ("pkg-config" ,pkg-config)
  126. ("openssl" ,openssl)))
  127. (home-page "https://www.swi-prolog.org/")
  128. (synopsis "ISO/Edinburgh-style Prolog interpreter")
  129. (description "SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog
  130. compiler with a rich set of built-in predicates. It offers a fast, robust and
  131. small environment which enables substantial applications to be developed with
  132. it.")
  133. (license license:bsd-2)))