mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
build: Check for Guile-SQLite3.
* m4/guix.m4 (GUIX_CHECK_GUILE_SQLITE3): New macro. * configure.ac: Use it and define 'HAVE_GUILE_SQLITE3'. * guix/self.scm (specification->package): Add "guile-sqlite3". (compiled-guix)[guile-sqlite3]: New variable. [dependencies]: Add it.
This commit is contained in:
parent
9f160a0d3c
commit
d59e75f3b5
3 changed files with 31 additions and 1 deletions
|
@ -124,6 +124,11 @@ dnl Guile-JSON is used in various places.
|
|||
GUILE_MODULE_AVAILABLE([have_guile_json], [(json)])
|
||||
AM_CONDITIONAL([HAVE_GUILE_JSON], [test "x$have_guile_json" = "xyes"])
|
||||
|
||||
dnl Guile-Sqlite3 is used by the (guix store ...) modules.
|
||||
GUIX_CHECK_GUILE_SQLITE3
|
||||
AM_CONDITIONAL([HAVE_GUILE_SQLITE3],
|
||||
[test "x$guix_cv_have_recent_guile_sqlite3" = "xyes"])
|
||||
|
||||
dnl Make sure we have a full-fledged Guile.
|
||||
GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads])
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ (define specification->package
|
|||
("guile-json" (ref '(gnu packages guile) 'guile-json))
|
||||
("guile-ssh" (ref '(gnu packages ssh) 'guile-ssh))
|
||||
("guile-git" (ref '(gnu packages guile) 'guile-git))
|
||||
("guile-sqlite3" (ref '(gnu packages guile) 'guile-sqlite3))
|
||||
("libgcrypt" (ref '(gnu packages gnupg) 'libgcrypt))
|
||||
("zlib" (ref '(gnu packages compression) 'zlib))
|
||||
("gzip" (ref '(gnu packages compression) 'gzip))
|
||||
|
@ -92,6 +93,7 @@ (define specification->package
|
|||
("guile2.0-json" (ref '(gnu packages guile) 'guile2.0-json))
|
||||
("guile2.0-ssh" (ref '(gnu packages ssh) 'guile2.0-ssh))
|
||||
("guile2.0-git" (ref '(gnu packages guile) 'guile2.0-git))
|
||||
;; XXX: No "guile2.0-sqlite3".
|
||||
(_ #f)))) ;no such package
|
||||
|
||||
|
||||
|
@ -216,11 +218,16 @@ (define guile-git
|
|||
"guile2.0-git"))
|
||||
|
||||
|
||||
(define guile-sqlite3
|
||||
(package-for-guile guile-version
|
||||
"guile-sqlite3"
|
||||
"guile2.0-sqlite3"))
|
||||
|
||||
(define dependencies
|
||||
(match (append-map (lambda (package)
|
||||
(cons (list "x" package)
|
||||
(package-transitive-propagated-inputs package)))
|
||||
(list guile-git guile-json guile-ssh))
|
||||
(list guile-git guile-json guile-ssh guile-sqlite3))
|
||||
(((labels packages _ ...) ...)
|
||||
packages)))
|
||||
|
||||
|
|
18
m4/guix.m4
18
m4/guix.m4
|
@ -174,6 +174,24 @@ AC_DEFUN([GUIX_CHECK_GUILE_SSH], [
|
|||
fi])
|
||||
])
|
||||
|
||||
dnl GUIX_CHECK_GUILE_SQLITE3
|
||||
dnl
|
||||
dnl Check whether a recent-enough Guile-Sqlite3 is available.
|
||||
AC_DEFUN([GUIX_CHECK_GUILE_SQLITE3], [
|
||||
dnl Check whether 'sqlite-bind-arguments' is available. It was introduced
|
||||
dnl in February 2018:
|
||||
dnl <https://notabug.org/civodul/guile-sqlite3/commit/1cd1dec96a9999db48c0ff45bab907efc637247f>.
|
||||
AC_CACHE_CHECK([whether Guile-Sqlite3 is available and recent enough],
|
||||
[guix_cv_have_recent_guile_sqlite3],
|
||||
[GUILE_CHECK([retval],
|
||||
[(@ (sqlite3) sqlite-bind-arguments)])
|
||||
if test "$retval" = 0; then
|
||||
guix_cv_have_recent_guile_sqlite3="yes"
|
||||
else
|
||||
guix_cv_have_recent_guile_sqlite3="no"
|
||||
fi])
|
||||
])
|
||||
|
||||
dnl GUIX_TEST_ROOT_DIRECTORY
|
||||
AC_DEFUN([GUIX_TEST_ROOT_DIRECTORY], [
|
||||
AC_CACHE_CHECK([for unit test root directory],
|
||||
|
|
Loading…
Reference in a new issue