opencog.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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. (define-module (gnu packages opencog)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages boost)
  21. #:use-module (gnu packages check)
  22. #:use-module (gnu packages databases)
  23. #:use-module (gnu packages guile)
  24. #:use-module (gnu packages language)
  25. #:use-module (gnu packages linux)
  26. #:use-module (gnu packages multiprecision)
  27. #:use-module (gnu packages pkg-config)
  28. #:use-module (gnu packages python)
  29. #:use-module ((guix licenses) #:prefix license:)
  30. #:use-module (guix packages)
  31. #:use-module (guix git-download)
  32. #:use-module (guix build-system cmake)
  33. #:use-module (guix utils))
  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")
  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++
  63. utilities use for typical programming tasks in multiple OpenCog projects.")
  64. ;; Either of these licenses.
  65. (license (list license:agpl3 license:asl2.0)))))
  66. (define-public atomspace
  67. ;; The last release was in 2016 and doesn't build with our Boost package.
  68. (let ((commit "86c848dfc7135b3c47deb581f8da54a60f6711c9")
  69. (revision "1"))
  70. (package
  71. (name "atomspace")
  72. (version (git-version "5.0.3" revision commit))
  73. (source (origin
  74. (method git-fetch)
  75. (uri (git-reference
  76. (url "https://github.com/opencog/atomspace")
  77. (commit commit)))
  78. (file-name (git-file-name name version))
  79. (sha256
  80. (base32
  81. "0vxzhszb0z8081li38hid07a5axzxyflsmq1mcn4b1k4z1j8ggch"))))
  82. (build-system cmake-build-system)
  83. (arguments
  84. `(#:test-target "tests"
  85. #:configure-flags
  86. (list (string-append "-DGUILE_INCLUDE_DIR="
  87. (assoc-ref %build-inputs "guile")
  88. "/include/guile/2.2/")
  89. (string-append "-DGUILE_SITE_DIR="
  90. (assoc-ref %outputs "out")
  91. "/share/guile/site/2.2/"))))
  92. (inputs
  93. `(("boost" ,boost)
  94. ("cogutil" ,cogutil)
  95. ("gmp" ,gmp)
  96. ("guile" ,guile-2.2)
  97. ("postgresql" ,postgresql)))
  98. (native-inputs
  99. `(("cxxtest" ,cxxtest)
  100. ("python" ,python-minimal)
  101. ("pkg-config" ,pkg-config)))
  102. (home-page "https://github.com/opencog/atomspace/")
  103. (synopsis "OpenCog hypergraph database, query system and rule engine")
  104. (description "The OpenCog AtomSpace is an in-RAM @dfn{knowledge
  105. representation} (KR) database, an associated query engine and graph-re-writing
  106. system, and a rule-driven inferencing engine that can apply and manipulate
  107. sequences of rules to perform reasoning. It is a layer that sits on top of
  108. ordinary distributed (graph) databases, providing a large variety of advanced
  109. features not otherwise available.")
  110. (license license:agpl3))))
  111. (define-public cogserver
  112. ;; There are no releases.
  113. (let ((commit "ec5f3b9590db0f6a085b5d0320f5d3710e0f1635")
  114. (revision "2"))
  115. (package
  116. (name "cogserver")
  117. (version (git-version "0" revision commit))
  118. (source (origin
  119. (method git-fetch)
  120. (uri (git-reference
  121. (url "https://github.com/opencog/cogserver")
  122. (commit commit)))
  123. (file-name (git-file-name name version))
  124. (sha256
  125. (base32
  126. "1h0vcxb6n5dc654xqinqcxc7dxwcs6bsywgir8rhrqiykk760mzl"))))
  127. (build-system cmake-build-system)
  128. (arguments
  129. `(#:test-target "tests"
  130. #:configure-flags
  131. (list (string-append "-DGUILE_INCLUDE_DIR="
  132. (assoc-ref %build-inputs "guile")
  133. "/include/guile/2.2/")
  134. (string-append "-DGUILE_SITE_DIR="
  135. (assoc-ref %outputs "out")
  136. "/share/guile/site/2.2/"))))
  137. (inputs
  138. `(("atomspace" ,atomspace)
  139. ("boost" ,boost)
  140. ("cogutil" ,cogutil)
  141. ("gmp" ,gmp)
  142. ("guile" ,guile-2.2)))
  143. (native-inputs
  144. `(("cxxtest" ,cxxtest)
  145. ("python" ,python-minimal)
  146. ("pkg-config" ,pkg-config)))
  147. (home-page "https://github.com/opencog/cogserver/")
  148. (synopsis "OpenCog network server")
  149. (description "The OpenCog Cogserver is a network and job server for the
  150. OpenCog framework.")
  151. (license license:agpl3))))
  152. (define-public attention
  153. ;; There are no releases.
  154. (let ((commit "87d43679280ce486cd6757765d2e1df6d502991d")
  155. (revision "1"))
  156. (package
  157. (name "attention")
  158. (version (git-version "0" revision commit))
  159. (source (origin
  160. (method git-fetch)
  161. (uri (git-reference
  162. (url "https://github.com/opencog/attention")
  163. (commit commit)))
  164. (file-name (git-file-name name version))
  165. (sha256
  166. (base32
  167. "0sndslphicv6w9qpag168rqkxq5sf71l5qbfx6zhsd5bzlf5fhwv"))))
  168. (build-system cmake-build-system)
  169. (arguments
  170. `(#:test-target "tests"
  171. #:configure-flags
  172. (list
  173. (string-append "-DGUILE_INCLUDE_DIR="
  174. (assoc-ref %build-inputs "guile")
  175. "/include/guile/2.2/")
  176. (string-append "-DGUILE_SITE_DIR="
  177. (assoc-ref %outputs "out")
  178. "/share/guile/site/2.2/"))))
  179. (inputs
  180. `(("atomspace" ,atomspace)
  181. ("boost" ,boost)
  182. ("cogserver" ,cogserver)
  183. ("cogutil" ,cogutil)
  184. ("gmp" ,gmp)
  185. ("guile" ,guile-2.2)))
  186. (native-inputs
  187. `(("cxxtest" ,cxxtest)
  188. ("python" ,python-minimal)
  189. ("pkg-config" ,pkg-config)))
  190. (home-page "https://github.com/opencog/attention/")
  191. (synopsis "OpenCog attention allocation subsystem")
  192. (description "Attention Allocation is an OpenCog subsystem meant to
  193. control the application of processing and memory resources to specific
  194. tasks.")
  195. (license license:agpl3))))
  196. (define-public opencog
  197. ;; There are no recent releases.
  198. (let ((commit "ceac90507610cb2d0ee98f97a2086865292b1204")
  199. (revision "1"))
  200. (package
  201. (name "opencog")
  202. (version (git-version "0.1.4" revision commit))
  203. (source (origin
  204. (method git-fetch)
  205. (uri (git-reference
  206. (url "https://github.com/opencog/opencog")
  207. (commit commit)))
  208. (file-name (git-file-name name version))
  209. (sha256
  210. (base32
  211. "1j8wv910fvrmph370wv5pv2f4bc2s9vl6i7bw3pkmwbdhxkhjbhm"))))
  212. (build-system cmake-build-system)
  213. (arguments
  214. `(#:test-target "tests"
  215. #:configure-flags
  216. (list
  217. (string-append "-DGUILE_INCLUDE_DIR="
  218. (assoc-ref %build-inputs "guile")
  219. "/include/guile/2.2/")
  220. (string-append "-DGUILE_SITE_DIR="
  221. (assoc-ref %outputs "out")
  222. "/share/guile/site/2.2/"))))
  223. (inputs
  224. `(("attention" ,attention)
  225. ("atomspace" ,atomspace)
  226. ("boost" ,boost)
  227. ("cogserver" ,cogserver)
  228. ("cogutil" ,cogutil)
  229. ("gmp" ,gmp)
  230. ("guile" ,guile-2.2)
  231. ("libuuid" ,util-linux "lib")
  232. ("link-grammar" ,link-grammar)))
  233. (native-inputs
  234. `(("cxxtest" ,cxxtest)
  235. ("python" ,python-minimal)
  236. ("pkg-config" ,pkg-config)))
  237. (home-page "https://github.com/opencog/attention/")
  238. (synopsis "Framework for integrated artificial intelligence")
  239. (description "OpenCog is a framework for developing AI systems,
  240. especially appropriate for integrative multi-algorithm systems, and artificial
  241. general intelligence systems. It currently contains a functional core
  242. framework, and a number of cognitive agents at varying levels of completion,
  243. some already displaying interesting and useful functionalities alone and in
  244. combination.")
  245. (license license:agpl3))))
  246. (define-public agi-bio
  247. ;; There are no releases.
  248. (let ((commit "b5c6f3d99e8cca3798bf0cdf2c32f4bdb8098efb")
  249. (revision "1"))
  250. (package
  251. (name "agi-bio")
  252. (version (git-version "0" revision commit))
  253. (source (origin
  254. (method git-fetch)
  255. (uri (git-reference
  256. (url "https://github.com/opencog/agi-bio")
  257. (commit commit)))
  258. (file-name (git-file-name name version))
  259. (sha256
  260. (base32
  261. "0c3q0nhmd03nvqm1ih10y28n596cjvfhkcfvzw2fmz1sn3ywdah4"))))
  262. (build-system cmake-build-system)
  263. (arguments
  264. `(#:tests? #f ; there are none
  265. #:configure-flags
  266. (list
  267. (string-append "-DGUILE_INCLUDE_DIR="
  268. (assoc-ref %build-inputs "guile")
  269. "/include/guile/2.2/")
  270. (string-append "-DGUILE_SITE_DIR="
  271. (assoc-ref %outputs "out")
  272. "/share/guile/site/2.2/"))
  273. #:phases
  274. (modify-phases %standard-phases
  275. (add-after 'unpack 'fix-unqualified-load
  276. (lambda* (#:key outputs #:allow-other-keys)
  277. (substitute* "bioscience/bioscience.scm"
  278. (("\\(load \"bioscience/types/bioscience_types.scm\"\\)")
  279. (format #f "(load \"~a/bioscience/types/bioscience_types.scm\")"
  280. (string-append (assoc-ref outputs "out")
  281. "/share/guile/site/2.2/opencog"))))
  282. #t)))))
  283. (inputs
  284. `(("atomspace" ,atomspace)
  285. ("cogutil" ,cogutil)
  286. ("gmp" ,gmp)
  287. ("guile" ,guile-2.2)))
  288. (native-inputs
  289. `(("cxxtest" ,cxxtest)
  290. ("python" ,python-minimal)
  291. ("pkg-config" ,pkg-config)))
  292. (home-page "https://github.com/opencog/agi-bio")
  293. (synopsis "Genomic and proteomic data exploration and pattern mining")
  294. (description "This is a package for genomic and proteomic research using
  295. the OpenCog toolset with Guile. This includes experiments in applying pattern
  296. mining and other OpenCog components.")
  297. (license license:agpl3))))