From 0d57a50af28056cbe4a3c215e1a3cc95d88bba1c Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Fri, 14 Sep 2018 21:44:08 +0200 Subject: gnu: postgresql: Add extension-packages. * gnu/services/databases.scm (postgresql-configuration): Add extension-packages. (postgresql-shepherd-service): New key #:extension-packages. * doc/guix.texi (Database Services): Document it. --- doc/guix.texi | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index d2d278df47..b5c2d4d954 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13383,13 +13383,49 @@ The @code{(gnu services databases)} module provides the following services. @deffn {Scheme Procedure} postgresql-service [#:postgresql postgresql] @ [#:config-file] [#:data-directory ``/var/lib/postgresql/data''] @ - [#:port 5432] [#:locale ``en_US.utf8''] + [#:port 5432] [#:locale ``en_US.utf8''] [#:extension-packages '()] Return a service that runs @var{postgresql}, the PostgreSQL database server. The PostgreSQL daemon loads its runtime configuration from @var{config-file}, creates a database cluster with @var{locale} as the default locale, stored in @var{data-directory}. It then listens on @var{port}. + +@cindex postgresql extension-packages +Additional extensions are loaded from packages listed in +@var{extension-packages}. Extensions are available at runtime. For instance, +to create a geographic database using the @code{postgis} extension, a user can +configure the postgresql-service as in this example: + +@cindex postgis +@example +(use-package-modules databases geo) + +(operating-system + ... + ;; postgresql is required to run `psql' but postgis is not required for + ;; proper operation. + (packages (cons* postgresql %base-packages)) + (services + (cons* + (postgresql-service #:extension-packages (list postgis)) + %base-services))) +@end example + +Then the extension becomes visible and you can initialise an empty geographic +database in this way: + +@example +psql -U postgres +> create database postgistest; +> \connect postgistest; +> create extension postgis; +> create extension postgis_topology; +@end example + +There is no need to add this field for contrib extensions such as hstore or +dblink as they are already loadable by postgresql. This field is only +required to add extensions provided by other packages. @end deffn @deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)] -- cgit v1.2.3 From 9c6124f8297cfffb7c754f109882f8962ba56ef2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 7 Feb 2019 15:28:01 +0100 Subject: doc: Mention flag to get an ISO image. * doc/guix.texi (Building the Installation Image): Add '--file-system-type=iso9660'. --- doc/guix.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 868f1959e8..53c133804d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2375,7 +2375,8 @@ The installation image described above was built using the @command{guix system} command, specifically: @example -guix system disk-image gnu/system/install.scm +guix system disk-image --file-system-type=iso9660 \ + gnu/system/install.scm @end example Have a look at @file{gnu/system/install.scm} in the source tree, -- cgit v1.2.3 From 024a6bfba906742c136a47b4099f06880f1d3f15 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 8 Feb 2019 09:29:39 +0100 Subject: guix build: '--with-branch' & co. fetch submodules. * guix/scripts/build.scm (transform-package-source-branch)[replace]: Add 'recursive?' field to the new package. --- doc/guix.texi | 3 ++- guix/scripts/build.scm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 53c133804d..69b6985051 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7289,7 +7289,8 @@ care! Build @var{package} from the latest commit of @var{branch}. The @code{source} field of @var{package} must be an origin with the @code{git-fetch} method (@pxref{origin Reference}) or a @code{git-checkout} object; the repository URL -is taken from that @code{source}. +is taken from that @code{source}. Git sub-modules of the repository are +fetched, recursively. For instance, the following command builds @code{guile-sqlite3} from the latest commit of its @code{master} branch, and then builds @code{guix} (which diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 5a158799ae..fb7e04904d 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -308,7 +308,8 @@ strings like \"guile-next=stable-3.0\" meaning that packages are built using (package (inherit old) (version (string-append "git." branch)) - (source (git-checkout (url url) (branch branch))))) + (source (git-checkout (url url) (branch branch) + (recursive? #t))))) (let* ((replacements (evaluate-git-replacement-specs replacement-specs replace)) -- cgit v1.2.3