guile.scm 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
  4. ;;; Copyright © 2014, 2016, 2018 David Thompson <davet@gnu.org>
  5. ;;; Copyright © 2014, 2017, 2018 Mark H Weaver <mhw@netris.org>
  6. ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
  7. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  8. ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
  9. ;;; Copyright © 2016, 2019 Ricardo Wurmus <rekado@elephly.net>
  10. ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
  11. ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
  12. ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  13. ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
  14. ;;; Copyright © 2017, 2018 Amirouche <amirouche@hypermove.net>
  15. ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
  16. ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
  17. ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
  18. ;;;
  19. ;;; This file is part of GNU Guix.
  20. ;;;
  21. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  22. ;;; under the terms of the GNU General Public License as published by
  23. ;;; the Free Software Foundation; either version 3 of the License, or (at
  24. ;;; your option) any later version.
  25. ;;;
  26. ;;; GNU Guix is distributed in the hope that it will be useful, but
  27. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  28. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29. ;;; GNU General Public License for more details.
  30. ;;;
  31. ;;; You should have received a copy of the GNU General Public License
  32. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  33. (define-module (gnu packages guile)
  34. #:use-module ((guix licenses) #:prefix license:)
  35. #:use-module (gnu packages)
  36. #:use-module (gnu packages autotools)
  37. #:use-module (gnu packages base)
  38. #:use-module (gnu packages bash)
  39. #:use-module (gnu packages bdw-gc)
  40. #:use-module (gnu packages compression)
  41. #:use-module (gnu packages dbm)
  42. #:use-module (gnu packages flex)
  43. #:use-module (gnu packages gawk)
  44. #:use-module (gnu packages gettext)
  45. #:use-module (gnu packages hurd)
  46. #:use-module (gnu packages libffi)
  47. #:use-module (gnu packages libunistring)
  48. #:use-module (gnu packages linux)
  49. #:use-module (gnu packages m4)
  50. #:use-module (gnu packages multiprecision)
  51. #:use-module (gnu packages pkg-config)
  52. #:use-module (gnu packages readline)
  53. #:use-module (gnu packages sqlite)
  54. #:use-module (gnu packages texinfo)
  55. #:use-module (gnu packages version-control)
  56. #:use-module (guix packages)
  57. #:use-module (guix download)
  58. #:use-module (guix git-download)
  59. #:use-module (guix build-system gnu)
  60. #:use-module (guix build-system guile)
  61. #:use-module (guix utils)
  62. #:use-module (ice-9 match)
  63. #:use-module ((srfi srfi-1) #:prefix srfi-1:))
  64. ;;; Commentary:
  65. ;;;
  66. ;;; GNU Guile, and modules and extensions.
  67. ;;;
  68. ;;; Code:
  69. (define-public guile-1.8
  70. (package
  71. (name "guile")
  72. (version "1.8.8")
  73. (source (origin
  74. (method url-fetch)
  75. (uri (string-append "mirror://gnu/guile/guile-" version
  76. ".tar.gz"))
  77. (sha256
  78. (base32
  79. "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
  80. (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
  81. (build-system gnu-build-system)
  82. (arguments '(#:configure-flags '("--disable-error-on-warning")
  83. ;; Insert a phase before `configure' to patch things up.
  84. #:phases
  85. (modify-phases %standard-phases
  86. (add-before 'configure 'patch-stuff
  87. (lambda* (#:key outputs #:allow-other-keys)
  88. ;; Add a call to `lt_dladdsearchdir' so that
  89. ;; `libguile-readline.so' & co. are in the
  90. ;; loader's search path.
  91. (substitute* "libguile/dynl.c"
  92. (("lt_dlinit.*$" match)
  93. (format #f
  94. " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
  95. match
  96. (assoc-ref outputs "out"))))
  97. ;; The usual /bin/sh...
  98. (substitute* "ice-9/popen.scm"
  99. (("/bin/sh") (which "sh")))
  100. #t)))))
  101. (inputs `(("gawk" ,gawk)
  102. ("readline" ,readline)))
  103. ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
  104. ;; propagated.
  105. (propagated-inputs `(("gmp" ,gmp)
  106. ("libltdl" ,libltdl)))
  107. ;; When cross-compiling, a native version of Guile itself is needed.
  108. (self-native-input? #t)
  109. (native-search-paths
  110. (list (search-path-specification
  111. (variable "GUILE_LOAD_PATH")
  112. (files '("share/guile/site")))))
  113. (synopsis "Scheme implementation intended especially for extensions")
  114. (description
  115. "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
  116. official extension language of the GNU system. It is an implementation of
  117. the Scheme language which can be easily embedded in other applications to
  118. provide a convenient means of extending the functionality of the application
  119. without requiring the source code to be rewritten.")
  120. (home-page "https://www.gnu.org/software/guile/")
  121. (license license:lgpl2.0+)))
  122. (define-public guile-2.0
  123. (package
  124. (name "guile")
  125. (version "2.0.14")
  126. (source (origin
  127. (method url-fetch)
  128. (uri (string-append "mirror://gnu/guile/guile-" version
  129. ".tar.xz"))
  130. (sha256
  131. (base32
  132. "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
  133. (build-system gnu-build-system)
  134. (native-inputs `(("pkgconfig" ,pkg-config)))
  135. (inputs `(("libffi" ,libffi)
  136. ,@(libiconv-if-needed)
  137. ;; We need Bash when cross-compiling because some of the scripts
  138. ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
  139. ;; an interactive Bash with Readline and all.
  140. ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
  141. (propagated-inputs
  142. `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
  143. ;; reads `-lltdl -lunistring', adding them here will add the needed
  144. ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
  145. ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
  146. ("libunistring" ,libunistring)
  147. ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
  148. ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
  149. ("libltdl" ,libltdl)
  150. ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
  151. ;; must be propagated.
  152. ("bdw-gc" ,libgc)
  153. ("gmp" ,gmp)))
  154. (self-native-input? #t)
  155. (outputs '("out" "debug"))
  156. (arguments
  157. `(#:configure-flags '("--disable-static") ; saves 3 MiB
  158. #:phases
  159. (modify-phases %standard-phases
  160. (add-before 'configure 'pre-configure
  161. (lambda* (#:key inputs #:allow-other-keys)
  162. ;; Tell (ice-9 popen) the file name of Bash.
  163. (let ((bash (assoc-ref inputs "bash")))
  164. (substitute* "module/ice-9/popen.scm"
  165. ;; If bash is #f allow fallback for user to provide
  166. ;; "bash" in PATH. This happens when cross-building to
  167. ;; MinGW for which we do not have Bash yet.
  168. (("/bin/sh")
  169. ,@(if (target-mingw?)
  170. '((if bash
  171. (string-append bash "/bin/bash")
  172. "bash"))
  173. '((string-append bash "/bin/bash")))))
  174. #t))))))
  175. (native-search-paths
  176. (list (search-path-specification
  177. (variable "GUILE_LOAD_PATH")
  178. (files '("share/guile/site/2.0")))
  179. (search-path-specification
  180. (variable "GUILE_LOAD_COMPILED_PATH")
  181. (files '("lib/guile/2.0/site-ccache")))))
  182. (synopsis "Scheme implementation intended especially for extensions")
  183. (description
  184. "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
  185. official extension language of the GNU system. It is an implementation of
  186. the Scheme language which can be easily embedded in other applications to
  187. provide a convenient means of extending the functionality of the application
  188. without requiring the source code to be rewritten.")
  189. (home-page "https://www.gnu.org/software/guile/")
  190. (license license:lgpl3+)))
  191. (define-public guile-2.0.13
  192. ;; For testing a "minimal" Guix
  193. (hidden-package
  194. (package (inherit guile-2.0)
  195. (name "guile")
  196. (version "2.0.13")
  197. (source (origin
  198. (method url-fetch)
  199. (uri (string-append "mirror://gnu/guile/guile-" version
  200. ".tar.xz"))
  201. (sha256
  202. (base32
  203. "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p")))))))
  204. (define-public guile-2.2
  205. (package (inherit guile-2.0)
  206. (name "guile")
  207. (version "2.2.4")
  208. (source (origin
  209. (method url-fetch)
  210. ;; Note: we are limited to one of the compression formats
  211. ;; supported by the bootstrap binaries, so no lzip here.
  212. (uri (string-append "mirror://gnu/guile/guile-" version
  213. ".tar.xz"))
  214. (sha256
  215. (base32
  216. "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r"))
  217. (modules '((guix build utils)))
  218. ;; Remove the pre-built object files. Instead, build everything
  219. ;; from source, at the expense of significantly longer build
  220. ;; times (almost 3 hours on a 4-core Intel i5).
  221. (snippet '(begin
  222. (for-each delete-file
  223. (find-files "prebuilt" "\\.go$"))
  224. #t))))
  225. (properties '((timeout . 72000) ;20 hours
  226. (max-silent-time . 36000))) ;10 hours (needed on ARM
  227. ; when heavily loaded)
  228. (native-search-paths
  229. (list (search-path-specification
  230. (variable "GUILE_LOAD_PATH")
  231. (files '("share/guile/site/2.2")))
  232. (search-path-specification
  233. (variable "GUILE_LOAD_COMPILED_PATH")
  234. (files '("lib/guile/2.2/site-ccache")))))
  235. (arguments
  236. (if (%current-target-system)
  237. (substitute-keyword-arguments (package-arguments guile-2.0)
  238. ((#:phases phases '%standard-phases)
  239. `(modify-phases ,phases
  240. (add-after 'unpack 'sacrifice-elisp-support
  241. (lambda _
  242. ;; Cross-compiling language/elisp/boot.el fails, so
  243. ;; sacrifice it. See
  244. ;; <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=988aa29238fca862c7e2cb55f15762a69b4c16ce>
  245. ;; for the upstream fix.
  246. (substitute* "module/Makefile.in"
  247. (("language/elisp/boot\\.el")
  248. "\n"))
  249. #t))
  250. ,@(if (hurd-target?)
  251. `((add-after 'unpack 'allow-madvise-ENOSYS
  252. (lambda _
  253. ;; Do not warn about ENOSYS on 'madvise'. This is
  254. ;; what Guile commit
  255. ;; 45e4ace6603e00b297e6542362273041aebe7305 does.
  256. ;; TODO: Remove for Guile >= 2.2.5.
  257. (substitute* "libguile/vm.c"
  258. (("perror \\(\"madvise failed\"\\)")
  259. "if (errno != ENOSYS) perror (\"madvised failed\");"))
  260. #t)))
  261. '()))))
  262. (package-arguments guile-2.0)))))
  263. (define-public guile-2.2/fixed
  264. ;; A package of Guile 2.2 that's rarely changed. It is the one used
  265. ;; in the `base' module, and thus changing it entails a full rebuild.
  266. (package
  267. (inherit guile-2.2)
  268. (properties '((hidden? . #t) ;people should install 'guile-2.2'
  269. (timeout . 72000) ;20 hours
  270. (max-silent-time . 36000))))) ;10 hours (needed on ARM
  271. ; when heavily loaded)
  272. (define-public guile-next
  273. ;; This is the upcoming Guile 3.0, with JIT support.
  274. (let ((commit "6f3357b0df64c4be17e72079864c09a542f1c779")
  275. (revision "1"))
  276. (package
  277. (inherit guile-2.2)
  278. (name "guile-next")
  279. (version "2.9.1")
  280. (source (origin
  281. (inherit (package-source guile-2.2))
  282. (uri (string-append "https://alpha.gnu.org/gnu/guile/guile-"
  283. version ".tar.xz"))
  284. (sha256
  285. (base32
  286. "0iba93yqn6mvgid0rfsrg4amym36pg9m8cqdplxsy222blrj9gh1"))))
  287. (native-search-paths
  288. (list (search-path-specification
  289. (variable "GUILE_LOAD_PATH")
  290. (files '("share/guile/site/3.0")))
  291. (search-path-specification
  292. (variable "GUILE_LOAD_COMPILED_PATH")
  293. (files '("lib/guile/3.0/site-ccache"
  294. "share/guile/site/3.0")))))
  295. (properties '((ftp-server . "alpha.gnu.org")
  296. (upstream-name . "guile"))))))
  297. (define (make-guile-readline guile)
  298. (package
  299. (name "guile-readline")
  300. (version (package-version guile))
  301. (source (package-source guile))
  302. (build-system gnu-build-system)
  303. (arguments
  304. '(#:configure-flags '("--disable-silent-rules")
  305. #:phases (modify-phases %standard-phases
  306. (add-before 'build 'chdir
  307. (lambda* (#:key outputs #:allow-other-keys)
  308. (invoke "make" "-C" "libguile" "scmconfig.h")
  309. (invoke "make" "-C" "lib")
  310. (chdir "guile-readline")
  311. (substitute* "Makefile"
  312. (("../libguile/libguile-[[:graph:]]+\\.la")
  313. ;; Remove dependency on libguile-X.Y.la.
  314. "")
  315. (("^READLINE_LIBS = (.*)$" _ libs)
  316. ;; Link against the provided libguile.
  317. (string-append "READLINE_LIBS = "
  318. "-lguile-$(GUILE_EFFECTIVE_VERSION) "
  319. libs "\n"))
  320. (("\\$\\(top_builddir\\)/meta/build-env")
  321. ;; Use the provided Guile, not the one from
  322. ;; $(builddir).
  323. "")
  324. ;; Install modules to the 'site' directories.
  325. (("^moddir = .*$")
  326. "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
  327. (("^ccachedir = .*$")
  328. "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
  329. ;; Load 'guile-readline.so' from the right place.
  330. (substitute* "ice-9/readline.scm"
  331. (("load-extension \"guile-readline\"")
  332. (format #f "load-extension \
  333. (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
  334. (assoc-ref outputs "out"))))
  335. #t)))))
  336. (home-page (package-home-page guile))
  337. (native-inputs (package-native-inputs guile))
  338. (inputs
  339. `(,@(package-inputs guile) ;to placate 'configure'
  340. ,@(package-propagated-inputs guile)
  341. ("guile" ,guile)
  342. ("readline" ,readline)))
  343. (synopsis "Line editing support for GNU Guile")
  344. (description
  345. "This module provides line editing support via the Readline library for
  346. GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
  347. @code{activate-readline} procedure to enable it.")
  348. (license license:gpl3+)))
  349. (define-public guile-readline
  350. (make-guile-readline guile-2.2))
  351. (define (guile-variant-package-name prefix)
  352. (lambda (name)
  353. "Return NAME with PREFIX instead of \"guile-\", when applicable."
  354. (if (string-prefix? "guile-" name)
  355. (string-append prefix "-"
  356. (string-drop name
  357. (string-length "guile-")))
  358. name)))
  359. (define package-for-guile-2.0
  360. ;; A procedure that rewrites the dependency tree of the given package to use
  361. ;; GUILE-2.0 instead of GUILE-2.2.
  362. (package-input-rewriting (delay `((,guile-2.2 . ,guile-2.0)))
  363. (guile-variant-package-name "guile2.0")))
  364. (define-public guile-for-guile-emacs
  365. (package (inherit guile-2.2)
  366. (name "guile-for-guile-emacs")
  367. (version "20150510.d8d9a8d")
  368. (source (origin
  369. (method git-fetch)
  370. (uri (git-reference
  371. (url "git://git.hcoop.net/git/bpt/guile.git")
  372. (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
  373. (file-name (string-append name "-" version "-checkout"))
  374. (sha256
  375. (base32
  376. "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
  377. (arguments
  378. `(;; Tests aren't passing for now.
  379. ;; Obviously we should re-enable this!
  380. #:tests? #f
  381. ,@(package-arguments guile-2.2)))
  382. (native-inputs
  383. `(("autoconf" ,autoconf)
  384. ("automake" ,automake)
  385. ("libtool" ,libtool)
  386. ("flex" ,flex)
  387. ("texinfo" ,texinfo)
  388. ("gettext" ,gettext-minimal)
  389. ,@(package-native-inputs guile-2.2)))
  390. ;; Same as in guile-2.0
  391. (native-search-paths
  392. (list (search-path-specification
  393. (variable "GUILE_LOAD_PATH")
  394. (files '("share/guile/site/2.0")))
  395. (search-path-specification
  396. (variable "GUILE_LOAD_COMPILED_PATH")
  397. (files '("lib/guile/2.0/site-ccache"
  398. "share/guile/site/2.0")))))))
  399. ;;;
  400. ;;; Extensions.
  401. ;;;
  402. (define-public guile-json
  403. (package
  404. (name "guile-json")
  405. (version "1.2.0")
  406. (home-page "https://github.com/aconchillo/guile-json")
  407. (source (origin
  408. (method url-fetch)
  409. (uri (string-append "https://download.savannah.nongnu.org/releases/"
  410. name "/" name "-" version ".tar.gz"))
  411. (sha256
  412. (base32
  413. "15gnb84d7hpazqhskkf3g9z4r6knw54wfj4ch5270kakz1lp70c9"))))
  414. (build-system gnu-build-system)
  415. (native-inputs `(("pkg-config" ,pkg-config)
  416. ("guile" ,guile-2.2)))
  417. (inputs `(("guile" ,guile-2.2)))
  418. (synopsis "JSON module for Guile")
  419. (description
  420. "Guile-JSON supports parsing and building JSON documents according to the
  421. specification. These are the main features:
  422. @itemize
  423. @item Strictly complies to @uref{http://json.org, specification}.
  424. @item Build JSON documents programmatically via macros.
  425. @item Unicode support for strings.
  426. @item Allows JSON pretty printing.
  427. @end itemize\n")
  428. ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+).
  429. (license license:gpl3+)))
  430. (define-public guile2.2-json
  431. (deprecated-package "guile2.2-json" guile-json))
  432. (define-public guile2.0-json
  433. (package-for-guile-2.0 guile-json))
  434. (define-public guile-json-3
  435. ;; This version is incompatible with 1.x; see the 'NEWS' file.
  436. (package
  437. (inherit guile-json)
  438. (name "guile-json")
  439. (version "3.1.0")
  440. (source (origin
  441. (method url-fetch)
  442. (uri (string-append "https://download.savannah.nongnu.org/releases/"
  443. name "/" name "-" version ".tar.gz"))
  444. (sha256
  445. (base32
  446. "1yfqscz74i4vxylabd3s9l0wbdp8bg9qxnv1ixdm3b1l7zdx00z3"))))))
  447. ;; There are two guile-gdbm packages, one using the FFI and one with
  448. ;; direct C bindings, hence the verbose name.
  449. (define-public guile-gdbm-ffi
  450. (package
  451. (name "guile-gdbm-ffi")
  452. (version "20120209.fa1d5b6")
  453. (source (origin
  454. (method git-fetch)
  455. (uri (git-reference
  456. (url "https://github.com/ijp/guile-gdbm.git")
  457. (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
  458. (file-name (string-append name "-" version "-checkout"))
  459. (patches (search-patches
  460. "guile-gdbm-ffi-support-gdbm-1.14.patch"))
  461. (sha256
  462. (base32
  463. "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
  464. (build-system guile-build-system)
  465. (arguments
  466. '(#:phases (modify-phases %standard-phases
  467. (add-after 'unpack 'move-examples
  468. (lambda* (#:key outputs #:allow-other-keys)
  469. ;; Move examples where they belong.
  470. (let* ((out (assoc-ref outputs "out"))
  471. (doc (string-append out "/share/doc/"
  472. (strip-store-file-name out)
  473. "/examples")))
  474. (copy-recursively "examples" doc)
  475. (delete-file-recursively "examples")
  476. #t)))
  477. (add-after 'unpack 'set-libgdbm-file-name
  478. (lambda* (#:key inputs #:allow-other-keys)
  479. (substitute* "gdbm.scm"
  480. (("\\(dynamic-link \"libgdbm\"\\)")
  481. (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
  482. (assoc-ref inputs "gdbm"))))
  483. #t)))))
  484. (native-inputs
  485. `(("guile" ,guile-2.2)))
  486. (inputs
  487. `(("gdbm" ,gdbm)))
  488. (home-page "https://github.com/ijp/guile-gdbm")
  489. (synopsis "Guile bindings to the GDBM library via Guile's FFI")
  490. (description
  491. "Guile bindings to the GDBM key-value storage system, using
  492. Guile's foreign function interface.")
  493. (license license:gpl3+)))
  494. (define-public guile2.0-gdbm-ffi
  495. (package-for-guile-2.0 guile-gdbm-ffi))
  496. (define-public guile2.2-gdbm-ffi
  497. (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
  498. (define-public guile-sqlite3
  499. (package
  500. (name "guile-sqlite3")
  501. (version "0.1.0")
  502. (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git")
  503. (source (origin
  504. (method git-fetch)
  505. (uri (git-reference
  506. (url home-page)
  507. (commit (string-append "v" version))))
  508. (sha256
  509. (base32
  510. "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
  511. (file-name (string-append name "-" version "-checkout"))))
  512. (build-system gnu-build-system)
  513. (native-inputs
  514. `(("autoconf" ,autoconf)
  515. ("automake" ,automake)
  516. ("pkg-config" ,pkg-config)))
  517. (inputs
  518. `(("guile" ,guile-2.2)
  519. ("sqlite" ,sqlite)))
  520. (synopsis "Access SQLite databases from Guile")
  521. (description
  522. "This package provides Guile bindings to the SQLite database system.")
  523. (license license:gpl3+)))
  524. (define-public guile2.0-sqlite3
  525. (package-for-guile-2.0 guile-sqlite3))
  526. (define-public guile-bytestructures
  527. (package
  528. (name "guile-bytestructures")
  529. (version "1.0.5")
  530. (source (origin
  531. (method url-fetch)
  532. (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
  533. "/releases/download/v" version
  534. "/bytestructures-" version ".tar.gz"))
  535. (sha256
  536. (base32
  537. "0ibk7fjwpb450lnrva4bx45sgln3pbyb645az4ansvh1spgani43"))))
  538. (build-system gnu-build-system)
  539. (native-inputs
  540. `(("pkg-config" ,pkg-config)))
  541. (inputs
  542. `(("guile" ,guile-2.2)))
  543. (home-page "https://github.com/TaylanUB/scheme-bytestructures")
  544. (synopsis "Structured access to bytevector contents for Guile")
  545. (description
  546. "Guile bytestructures offers a system imitating the type system
  547. of the C programming language, to be used on bytevectors. C's type
  548. system works on raw memory, and Guile works on bytevectors which are
  549. an abstraction over raw memory. It's also more powerful than the C
  550. type system, elevating types to first-class status.")
  551. (license license:gpl3+)))
  552. (define-public guile2.0-bytestructures
  553. (package-for-guile-2.0 guile-bytestructures))
  554. (define-public guile-git
  555. (package
  556. (name "guile-git")
  557. (version "0.2.0")
  558. (home-page "https://gitlab.com/guile-git/guile-git.git")
  559. (source (origin
  560. (method git-fetch)
  561. (uri (git-reference (url home-page)
  562. (commit (string-append "v" version))))
  563. (sha256
  564. (base32
  565. "018hmfsh0rjwfvr4h7y10jc6k8a2k9xsirngghy3pjasin4nd2yz"))
  566. (file-name (git-file-name name version))))
  567. (build-system gnu-build-system)
  568. (native-inputs
  569. `(("autoconf" ,autoconf)
  570. ("automake" ,automake)
  571. ("texinfo" ,texinfo)
  572. ("pkg-config" ,pkg-config)))
  573. (inputs
  574. `(("guile" ,guile-2.2)
  575. ("libgit2" ,libgit2)))
  576. (propagated-inputs
  577. `(("guile-bytestructures" ,guile-bytestructures)))
  578. (synopsis "Guile bindings for libgit2")
  579. (description
  580. "This package provides Guile bindings to libgit2, a library to
  581. manipulate repositories of the Git version control system.")
  582. (license license:gpl3+)))
  583. (define-public guile2.0-git
  584. (package-for-guile-2.0 guile-git))
  585. ;;; guile.scm ends here