summaryrefslogtreecommitdiff
path: root/guix/scripts/pack.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/pack.scm')
-rw-r--r--guix/scripts/pack.scm21
1 files changed, 15 insertions, 6 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 518bf6e7e3..e0f9cc1a12 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -81,6 +82,11 @@
#~(#+(file-append xz "/bin/xz") "-e"))
(compressor "bzip2" ".bz2"
#~(#+(file-append bzip2 "/bin/bzip2") "-9"))
+ (compressor "zstd" ".zst"
+ ;; The default level 3 compresses better than gzip in a
+ ;; fraction of the time, while the highest level 19
+ ;; (de)compresses more slowly and worse than xz.
+ #~(#+(file-append zstd "/bin/zstd") "-3"))
(compressor "none" "" #f)))
;; This one is only for use in this module, so don't put it in %compressors.
@@ -140,13 +146,16 @@ dependencies are registered."
(define (read-closure closure)
(call-with-input-file closure read-reference-graph))
+ (define db-file
+ (store-database-file #:state-directory #$output))
+
+ (sql-schema #$schema)
(let ((items (append-map read-closure '#$labels)))
- (register-items items
- #:state-directory #$output
- #:deduplicate? #f
- #:reset-timestamps? #f
- #:registration-time %epoch
- #:schema #$schema))))))
+ (with-database db-file db
+ (register-items db items
+ #:deduplicate? #f
+ #:reset-timestamps? #f
+ #:registration-time %epoch)))))))
(computed-file "store-database" build
#:options `(#:references-graphs ,(zip labels items))))