profiles: Use 'with-extensions'.

* guix/profiles.scm (manual-database)[build]: Use 'with-extensions'.
Remove 'add-to-load-path' call.
* guix/man-db.scm: Use (gdbm) the normal way; remove 'module-autoload!'
call.
This commit is contained in:
Ludovic Courtès 2018-05-28 22:00:11 +02:00
parent 33d8a87104
commit 331ac4cc23
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 31 additions and 35 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -19,6 +19,7 @@
(define-module (guix man-db)
#:use-module (guix zlib)
#:use-module ((guix build utils) #:select (find-files))
#:use-module (gdbm) ;gdbm-ffi
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
@ -44,9 +45,6 @@
;;;
;;; Code:
;; Load 'gdbm-ffi' at run time to simplify the job of 'imported-modules' & co.
(module-autoload! (current-module) '(gdbm) '(gdbm-open GDBM_WRCREAT))
(define-record-type <mandb-entry>
(mandb-entry file-name name section synopsis kind)
mandb-entry?

View File

@ -1196,10 +1196,8 @@ the entries in MANIFEST."
(define build
(with-imported-modules modules
(with-extensions (list gdbm-ffi) ;for (guix man-db)
#~(begin
(add-to-load-path (string-append #$gdbm-ffi "/share/guile/site/"
(effective-version)))
(use-modules (guix man-db)
(guix build utils)
(srfi srfi-1)
@ -1230,7 +1228,7 @@ the entries in MANIFEST."
(length entries)
(+ (time-second duration)
(* (time-nanosecond duration) (expt 10 -9))))
(force-output)))))
(force-output))))))
(gexp->derivation "manual-database" build