gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / prolog.scm
index 7c34498..a5c57cd 100644 (file)
 
 (define-module (gnu packages prolog)
   #:use-module (guix download)
-  #:use-module (guix licenses)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages backup)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages libunwind)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
 (define-public gprolog
 solving over finite domains.  It accepts Prolog+ constraint programs and
 produces a compiled, native binary which can function in a stand-alone
 manner.  It also features an interactive interpreter.")
-    (license (list gpl2+ lgpl3+))
+    (license (list license:gpl2+
+                   license:lgpl3+))
 
     ;; See 'configure' for the list of supported architectures.
     (supported-systems (fold delete
                              %supported-systems
                              '("armhf-linux" "mips64el-linux")))))
+
+(define-public swi-prolog
+  (package
+    (name "swi-prolog")
+    (version "8.3.20")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/SWI-Prolog/swipl-devel")
+                    (recursive? #t) ; TODO: Determine if this can be split out.
+                    (commit (string-append "V" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1g0v9cmz8zvzc1n0si7sn6522xwzbhj2b8967ibs6prinrpjc8d6"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:parallel-build? #t
+       #:tests? #t
+       #:configure-flags
+       (list "-DINSTALL_DOCUMENTATION=ON"
+             "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
+       #:phases
+       (modify-phases %standard-phases
+         ;; XXX: Delete the test phase that attempts to write to the
+         ;; immutable store.
+         (add-after 'unpack 'delete-failing-tests
+           (lambda _
+             (substitute* "src/CMakeLists.txt"
+               ((" save") ""))
+             (substitute* "src/test.pl"
+               (("testdir\\('Tests/save'\\).") ""))
+             (with-directory-excursion "src/Tests"
+               (for-each delete-file-recursively
+                         '("save")))
+             #t)))))
+    (native-inputs
+     `(("zlib" ,zlib)
+       ("gmp" ,gmp)
+       ("readline" ,readline)
+       ("texinfo" ,texinfo)
+       ("libarchive" ,libarchive)
+       ("libunwind" ,libunwind)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libxft" ,libxft)
+       ("fontconfig" ,fontconfig)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("openssl" ,openssl)))
+    (home-page "https://www.swi-prolog.org/")
+    (synopsis "ISO/Edinburgh-style Prolog interpreter")
+    (description "SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog
+compiler with a rich set of built-in predicates.  It offers a fast, robust and
+small environment which enables substantial applications to be developed with
+it.")
+    (license license:bsd-2)))