gnu: Add attention.
[jackhill/guix/guix.git] / gnu / packages / opencog.scm
CommitLineData
51c9221a
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
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 opencog)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages boost)
22 #:use-module (gnu packages check)
fc139475
RW
23 #:use-module (gnu packages databases)
24 #:use-module (gnu packages guile)
25 #:use-module (gnu packages multiprecision)
51c9221a
RW
26 #:use-module (gnu packages pkg-config)
27 #:use-module (gnu packages python)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix utils))
33
34(define-public cogutil
35 ;; The last release was in 2016. Other OpenCog packages require a later
36 ;; version.
37 (let ((commit "b07b41b2eaf01627c78b27f1f28bb09ef7086f8e")
38 (revision "1"))
39 (package
40 (name "cogutil")
41 (version (git-version "2.0.3" revision commit))
42 (source (origin
43 (method git-fetch)
44 (uri (git-reference
45 (url "https://github.com/opencog/cogutil.git")
46 (commit commit)))
47 (file-name (git-file-name name version))
48 (sha256
49 (base32
50 "1ymmcrinp0prlxsmxmwdjjl4kgaj7wzq39d5b1q2apgg94yfdhqb"))))
51 (build-system cmake-build-system)
52 (arguments
53 `(#:test-target "tests"))
54 (inputs
55 `(("boost" ,boost)))
56 (native-inputs
57 `(("cxxtest" ,cxxtest)
58 ("python" ,python-minimal)
59 ("pkg-config" ,pkg-config)))
60 (home-page "https://github.com/opencog/cogutil/")
61 (synopsis "Low-level C++ programming utilities used by OpenCog components")
62 (description "The OpenCog utilities is a miscellaneous collection of C++
63utilities use for typical programming tasks in multiple OpenCog projects.")
64 ;; Either of these licenses.
65 (license (list license:agpl3 license:asl2.0)))))
fc139475
RW
66
67(define-public atomspace
68 ;; The last release was in 2016 and doesn't build with our Boost package.
69 (let ((commit "86c848dfc7135b3c47deb581f8da54a60f6711c9")
70 (revision "1"))
71 (package
72 (name "atomspace")
73 (version (git-version "5.0.3" revision commit))
74 (source (origin
75 (method git-fetch)
76 (uri (git-reference
77 (url "https://github.com/opencog/atomspace.git")
78 (commit commit)))
79 (file-name (git-file-name name version))
80 (sha256
81 (base32
82 "0vxzhszb0z8081li38hid07a5axzxyflsmq1mcn4b1k4z1j8ggch"))))
83 (build-system cmake-build-system)
84 (arguments
85 `(#:test-target "tests"
86 #:configure-flags
87 (list (string-append "-DGUILE_INCLUDE_DIR="
88 (assoc-ref %build-inputs "guile")
89 "/include/guile/2.2/")
90 (string-append "-DGUILE_SITE_DIR="
91 (assoc-ref %outputs "out")
92 "/share/guile/site/2.2/"))))
93 (inputs
94 `(("boost" ,boost)
95 ("cogutil" ,cogutil)
96 ("gmp" ,gmp)
97 ("guile" ,guile-2.2)
98 ("postgresql" ,postgresql)))
99 (native-inputs
100 `(("cxxtest" ,cxxtest)
101 ("python" ,python-minimal)
102 ("pkg-config" ,pkg-config)))
103 (home-page "https://github.com/opencog/atomspace/")
104 (synopsis "OpenCog hypergraph database, query system and rule engine")
105 (description "The OpenCog AtomSpace is an in-RAM @dfn{knowledge
106representation} (KR) database, an associated query engine and graph-re-writing
107system, and a rule-driven inferencing engine that can apply and manipulate
108sequences of rules to perform reasoning. It is a layer that sits on top of
109ordinary distributed (graph) databases, providing a large variety of advanced
110features not otherwise available.")
111 (license license:agpl3))))
d946ede5
RW
112
113(define-public cogserver
114 ;; There are no releases.
115 (let ((commit "c8ad85fef446819e6bd711f0791887a5aa6a41f9")
116 (revision "1"))
117 (package
118 (name "cogserver")
119 (version (git-version "0" revision commit))
120 (source (origin
121 (method git-fetch)
122 (uri (git-reference
123 (url "https://github.com/opencog/cogserver.git")
124 (commit commit)))
125 (file-name (git-file-name name version))
126 (sha256
127 (base32
128 "0flwl2cbmnj7kjcx8vwk7rbhsp2si0a51ci0hx88a3xx1f76cp3f"))))
129 (build-system cmake-build-system)
130 (arguments
131 `(#:tests? #f ; See https://github.com/opencog/cogserver/issues/24
132 #:test-target "tests"
133 #:configure-flags
134 (list (string-append "-DGUILE_INCLUDE_DIR="
135 (assoc-ref %build-inputs "guile")
136 "/include/guile/2.2/")
137 (string-append "-DGUILE_SITE_DIR="
138 (assoc-ref %outputs "out")
139 "/share/guile/site/2.2/"))))
140 (inputs
141 `(("atomspace" ,atomspace)
142 ("boost" ,boost)
143 ("cogutil" ,cogutil)
144 ("gmp" ,gmp)
145 ("guile" ,guile-2.2)))
146 (native-inputs
147 `(("cxxtest" ,cxxtest)
148 ("python" ,python-minimal)
149 ("pkg-config" ,pkg-config)))
150 (home-page "https://github.com/opencog/cogserver/")
151 (synopsis "OpenCog network server")
152 (description "The OpenCog Cogserver is a network and job server for the
153OpenCog framework.")
154 (license license:agpl3))))
3cc6b123
RW
155
156(define-public attention
157 ;; There are no releases.
158 (let ((commit "87d43679280ce486cd6757765d2e1df6d502991d")
159 (revision "1"))
160 (package
161 (name "attention")
162 (version (git-version "0" revision commit))
163 (source (origin
164 (method git-fetch)
165 (uri (git-reference
166 (url "https://github.com/opencog/attention.git")
167 (commit commit)))
168 (file-name (git-file-name name version))
169 (sha256
170 (base32
171 "0sndslphicv6w9qpag168rqkxq5sf71l5qbfx6zhsd5bzlf5fhwv"))))
172 (build-system cmake-build-system)
173 (arguments
174 `(#:test-target "tests"
175 #:configure-flags
176 (list
177 (string-append "-DGUILE_INCLUDE_DIR="
178 (assoc-ref %build-inputs "guile")
179 "/include/guile/2.2/")
180 (string-append "-DGUILE_SITE_DIR="
181 (assoc-ref %outputs "out")
182 "/share/guile/site/2.2/"))))
183 (inputs
184 `(("atomspace" ,atomspace)
185 ("boost" ,boost)
186 ("cogserver" ,cogserver)
187 ("cogutil" ,cogutil)
188 ("gmp" ,gmp)
189 ("guile" ,guile-2.2)))
190 (native-inputs
191 `(("cxxtest" ,cxxtest)
192 ("python" ,python-minimal)
193 ("pkg-config" ,pkg-config)))
194 (home-page "https://github.com/opencog/attention/")
195 (synopsis "OpenCog attention allocation subsystem")
196 (description "Attention Allocation is an OpenCog subsystem meant to
197control the application of processing and memory resources to specific
198tasks.")
199 (license license:agpl3))))