mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
database: 'with-database' can now initialize new databases.
* nix/libstore/schema.sql: Rename to... * guix/store/schema.sql: ... this. * Makefile.am (nobase_dist_guilemodule_DATA): Add it. * nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly. * guix/store/database.scm (sql-schema): New variable. (sqlite-exec, initialize-database, call-with-database): New procedures. (with-database): Rewrite in terms of 'call-with-database'. * tests/store-database.scm ("new database"): New test. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to #:extra-files.
This commit is contained in:
parent
03439df66f
commit
3931c76154
6 changed files with 73 additions and 7 deletions
|
@ -163,7 +163,7 @@ noinst_HEADERS = \
|
|||
$(libformat_headers) $(libutil_headers) $(libstore_headers) \
|
||||
$(guix_daemon_headers)
|
||||
|
||||
%D%/libstore/schema.sql.hh: %D%/libstore/schema.sql
|
||||
%D%/libstore/schema.sql.hh: guix/store/schema.sql
|
||||
$(AM_V_GEN)$(GUILE) --no-auto-compile -c \
|
||||
"(use-modules (rnrs io ports)) \
|
||||
(call-with-output-file \"$@\" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue