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